Repository navigation
[js-api] Fix editorial slips for JS API document - #2254
Merged
f52985 merged 5 commits intoOct 1, 2026
Merged
Conversation
Several small mismatches between this document's own text and the established idioms it already uses elsewhere in the same file: - empty ordered map literal written as the list notation « » instead of «[ ]» (read the imports) - an unpiped 'keys' identifier in [[OwnPropertyKeys]] - Global's value getter/setter sharing one <div algorithm>, unlike every other algorithm in the document. Both halves are now named explicitly via algorithm=, the same way 'read the imports'/ 'memory.grow' already are elsewhere in this file - the setter has no <dfn> of its own to infer a name from (it's the same IDL attribute as the getter, which keeps the one <dfn> for both), and the getter's explicit name is purely for symmetry with it - 'contains' phrasing for a map-membership check, instead of the map/exists idiom used everywhere else - an ambiguous bare [=exception=] link where two dfns share the same text, resolved arbitrarily by Bikeshed today - ToJSValue's ref.i31 case missing 'interpreted as a mathematical value', unlike its i64/i32/f32/f64 sibling cases - an unlinked 'the memory address' and two unlinked 'reject' calls - 'the [=mem_size=](...)' carrying a spurious leading article - two match_valtype(...) conditions missing the 'is true' suffix every other boolean-returning condition in the document uses - a scalar |hostaddr| given a type-link annotation that only tag-carrying SpecTec values get elsewhere - |addrtype| compared against raw quoted "i32"/"i64" literals instead of the [=i32=]/[=i64=] links used for every other numtype/valtype comparison - Memory/Table constructors reading descriptor["address"] without routing it through ToValueType like every other enum-typed member - WebAssembly.JSTag's getter missing the <div algorithm> wrapper every other algorithm in the document has - 'is [=exception=] |exnaddr|' missing the 'of the form' this document always uses to destructure a payload-carrying case - twelve 'external value' variant links (func/global/mem/table) using Bikeshed pipe-display aliasing ([=external value|func=]) instead of the for-scoped form ([=external value/func=]) already used correctly for the sibling 'tag' variant, and by the adjacent external-type block for all five of its own variants. The link-defaults block only ever registered 'tag' as a for-scoped sub-term of 'external value', so the other four are given the same registration here. None of these require knowing anything about the Wasm Core Spec's own representation - each is checkable by reading this document alone.
Ms2ger
approved these changes
Sep 30, 2026
Co-authored-by: Ms2ger <Ms2ger@gmail.com>
Co-authored-by: Ms2ger <Ms2ger@gmail.com>
Co-authored-by: Ms2ger <Ms2ger@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
We're building a framework that turns the JS API document's prose into a real interpreter, the same way ESMeta already does for ECMA-262 — extracting each
<div algorithm>'s steps into an AST, lowering it to an IR, and running the result against the actual WebAssembly JS-API test suite. During that process, we found a few issues in this spec.This PR (plus its two companions) covers the ones that are purely editorial — no semantic impact, just text that doesn't match this document's own conventions. That's why we bundled them into one PR instead of three separate ones. This particular PR only needs this document itself to check. The other two PRs split off the ones that do need that (places where the Core Spec moved on and this file didn't follow), and a recurring mistake with ECMA-262's
?/!shorthand.(We also ran into a bunch of other issues along the way — real bugs, unclear prose, a few spots where the fix needs a judgment call. Those are bigger asks than these, so we'll send them one at a time instead of dumping everything into one PR.)
Changes
rejectcalls.« »instead of«[ ]»(read the imports).containsphrasing for a map-membership check, instead of themap/existsidiom used everywhere else.WebAssembly.JSTag's getter missing the<div algorithm>wrapper everyother algorithm in this document has.
Memory/Tableconstructors readingdescriptor["address"]withoutrouting it through
ToValueType, unlike every other enum-typed member.the [=mem_size=](...)carrying a spurious leading article.Global's value getter/setter sharing one<div algorithm>, unlike everyother algorithm in this document. Split into two, each named explicitly via
algorithm=the same wayread the imports/memory.growalready areelsewhere in this file — the setter has no
<dfn>of its own to infer aname from (it's the same IDL attribute as the getter, which keeps the one
<dfn>for both), and the getter's explicit name is purely for symmetry.is [=exception=] |exnaddr|— an ambiguous bare link (two dfns share thesame text, resolved arbitrarily by Bikeshed today) that's also missing the
"of the form" this document always uses to destructure a payload-carrying
case.
ToJSValue'sref.i31case missing "interpreted as a mathematical value",unlike its i64/i32/f32/f64 sibling cases.
match_valtype(...)conditions missing the "is true" suffix everyother boolean-returning condition in this document uses.
|hostaddr|given a type-link annotation that only tag-carryingSpecTec values get elsewhere.
|addrtype|compared against raw quoted"i32"/"i64"literals insteadof the
[=i32=]/[=i64=]links used for every other numtype/valtypecomparison.
keysidentifier in[[OwnPropertyKeys]].external valuevariant links (func/global/mem/table) useBikeshed pipe-display aliasing (
[=external value|func=]) instead of thefor-scoped form (
[=external value/func=]) the siblingtagvariantalready uses correctly.
link-defaultsonly registeredtag; the otherfour get the same registration here.