Skip to content

Out-of-date(?) ArrayBuffer usage in algorithmic text #346

Closed

Description

@bathos

Several algorithms have steps phrased like this:

Let result be a new ArrayBuffer associated with the relevant global object of this [HTML], and containing data.

There are a few issues here:

  • “Associated with the relevant global object” is odd indirection — what’s of interest is this’s relevant realm, not its relevant global object.
  • “ArrayBuffer” links to the Web IDL type. The type is not associated with a particular realm (or global object), the %ArrayBuffer% intrinsic is (via [[Intrinsics]].[[%ArrayBuffer%]]).
  • It is presumably correct to use the Web IDL type here, but in that case the algorithm should “call” create an ArrayBuffer passing the data and the realm.

Also, in Terminology, it states that ArrayBuffer and ArrayBufferView are defined by HTML, but they are defined (as used here) by Web IDL.

Activity

  1. twiss commented on Jun 15, 2023

    @twiss
    Member

    Hey 👋 Thanks for pointing this out! I'm not an expert on WebIDL, but I'll take a stab at fixing the text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions