Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust links to ECMAScript specifications #401

Merged
merged 2 commits into from
Apr 13, 2023

Conversation

tidoust
Copy link
Member

@tidoust tidoust commented Apr 13, 2023

Bikeshed converted [=/Type=] to a link to a definition in the WebCrypto API, which was not the intended target. This got fix in the cross-reference database used by Bikeshed, but that also means that [=/Type=] no longer links to anything. First commit in this PR updates these links to [=ECMAScript/Type=] (defined in the anchors metadata at the top of the source).

While I was looking at cross-references, I noticed that most local anchors definitions that targeted the ECMAScript are no longer needed because Bikeshed now has them in its cross-references database. Second commit in this PR replaces them with the right cross-reference shorthand notation.

(Second commit is not required in the sense that it does not "fix" anything. First commit fixes generation of the spec with Bikeshed. Happy to create a PR with just the first commit if you prefer to split things up).


Preview | Diff

tidoust added 2 commits April 13, 2023 11:14
Bikeshed converted `[=/Type=]` to a link to a definition in the WebCrypto API,
which was not the intended target. This got fix in the cross-reference database
used by Bikeshed, but that also means that `[=/Type=]` no longer links to
anything.

This fixes these links to `[=ECMAScript/Type=]` (defined in the anchors metadata
at the top of the source).
Most local anchor definitions that targeted the ECMAScript spec are no longer
needed because Bikeshed now has the spec in its cross-references database.
This update replaces them with the right shorthand text.

Remaining anchor definitions target sections or concepts that are not real
definitions and as such are not in the cross-references database.
Copy link
Member

@inexorabletash inexorabletash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with some follow-up items for me

[=ECMAScript/Uint8Array=]).
* [=ECMAScript/Array=] objects, where every item is defined, is itself a valid
* {{String}} primitive values.
* {{ArrayBuffer}} objects (or views on buffers such as
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now links to WebIDL's ArrayBuffer, which is probably fine. Just noting the change.

@@ -773,8 +754,8 @@ following type-specific properties:
<tr><th>Type</th><th>Properties</th></tr>
<tr><td>{{Blob}}</td><td>{{Blob/size}}, {{Blob/type}}</td></tr>
<tr><td>{{File}}</td><td>{{File/name}}, {{File/lastModified}}</td></tr>
<tr><td>[=ECMAScript/Array=]</td><td>`length`</td></tr>
<tr><td>[=ECMAScript/String=]</td><td>`length`</td></tr>
<tr><td>{{Array}}</td><td>`length`</td></tr>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self that we can probably linkify length here now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that {{Array/length}} doesn't work, so not that trivial?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I filed w3c/reffy#1256. The dfns crawler manages to extract Array methods from the ECMAScript spec but apparently does not see the length property. Will look into it!

@@ -3349,7 +3330,7 @@ The <dfn method for=IDBObjectStore>openCursor(|query|, |direction|)</dfn> method
[=cursor/range=] set to |range|, and
[=cursor/key only flag=] set to false.

1. Let |operation| be an algorithm to run [=iterate a cursor=] with the [=ECMAScript/current Realm=] |cursor|.
1. Let |operation| be an algorithm to run [=iterate a cursor=] with [=ECMAScript/the current Realm record=] |cursor|.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, there should be an "and" between record and cursor. Existing glitch.

@inexorabletash inexorabletash merged commit 4b675e3 into w3c:main Apr 13, 2023
github-actions bot added a commit that referenced this pull request Apr 13, 2023
SHA: 4b675e3
Reason: push, by inexorabletash

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@inexorabletash
Copy link
Member

Oh, and I forgot to say: this is AWESOME thank you so much for doing this! 🎉 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants