-
Notifications
You must be signed in to change notification settings - Fork 16
Editorial: self-referential changes #104
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
Draft
gesa
wants to merge
1
commit into
WinterTC55:main
Choose a base branch
from
gesa:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -21,7 +21,7 @@ There is a wide base of JavaScript runtime environments being used beyond web br | |||||
|
|
||||||
| But since code running in web browsers makes up the vast majority of JavaScript code, this is helped along if such runtimes support the same APIs as web browsers. So, unsurprisingly, more and more runtime environments have started supporting web platform APIs. However, the increase in such environments, as well as the different choices of web platform APIs, resulted in poor interoperability across such environments. | ||||||
|
|
||||||
| As such, this Ecma Standard defines the Minimum Common Web API specification, which lists a curated minimum subset of web platform APIs for server-side and edge runtimes to implement if they aim to be web-interoperable. This is the first edition of the standard, corresponding to the 2025 snapshot, and an additional snapshot will be published every year. | ||||||
| As such, this Ecma Standard defines the Minimum Common Web API specification, which lists a curated minimum subset of web platform APIs for server-side and edge runtimes to implement if they aim to be web-interoperable. This is the first edition of the standard, corresponding to the 2025 snapshot. An additional snapshot is intended to be published annually. | ||||||
|
|
||||||
| Scope {#scope} | ||||||
| ============== | ||||||
|
|
@@ -31,11 +31,11 @@ This Standard defines the 2025 snapshot of the Minimum Common Web Platform API, | |||||
| Conformance {#conformance} | ||||||
| ========================== | ||||||
|
|
||||||
| A conforming implementation of the Minimum Common Web Platform API shall conform to ECMA-262, and additionally shall provide the interfaces and properties listed in this specification, according to their definition in the corresponding W3C or WHATWG standard. | ||||||
| A conforming implementation of the Minimum Common Web Platform API shall conform to ECMA-262, and additionally shall provide the interfaces and properties listed in the present document, according to their definition in the corresponding W3C or WHATWG standard. | ||||||
|
|
||||||
| Runtime-specific extensions to any Web Platform API may be implemented by conforming runtimes. Such extensions shall be defined so that their use neither contradicts, nor causes the non-conformance of, normative functionality of any Web Platform API. It is important to carefully consider use of such extensions, as it reduces interoperability and portability of code across runtimes. | ||||||
|
|
||||||
| This specification does not prohibit implementing additional Web Platform APIs beyond those listed here. | ||||||
| The present dsocument does not prohibit implementing additional Web Platform APIs beyond those listed here. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| Note: For example, the {{Performance}} API could be extended with additional methods or properties beyond those defined in the [[HR-TIME]] specifications, such as those defined in the [[PERFORMANCE-TIMELINE]] or [[USER-TIMING]] specifications. | ||||||
|
|
||||||
|
|
@@ -57,16 +57,16 @@ The Web Platform is the combination of technology standards defined by organizat | |||||
| <dfn>Web-interoperable Runtime</dfn> {#term-web-interoperable-runtime} | ||||||
| ---------------------------------------------------------------------- | ||||||
|
|
||||||
| Any ECMAScript-based application runtime environment that implements the subset of Web Platform APIs outlined in this specification. | ||||||
| Any ECMAScript-based application runtime environment that implements the subset of Web Platform APIs outlined in the present document. | ||||||
|
|
||||||
| While this term is intentionally broad to also encompass Web Browsers, the primary focus here is on outlining expectations for non-browser runtimes. | ||||||
|
|
||||||
| Common API Index {#api-index} | ||||||
| ========================= | ||||||
|
|
||||||
| All <a>Web-interoperable Runtimes</a> conforming to this specification shall implement each of the following Web Platform APIs. These should be implemented in accordance with their normative requirements except where modified here. Where any conforming runtime environment chooses (either by necessity or otherwise) to diverge from a normative requirement of the specification, clear explanations of such divergence shall be made clearly and readily available in the documentation. | ||||||
| All <a>Web-interoperable Runtimes</a> conforming to the Minimum common web API shall implement each of the following Web Platform APIs. These should be implemented in accordance with their normative requirements except where modified here. Where any conforming runtime environment chooses (either by necessity or otherwise) to diverge from a normative requirement of the specification, clear explanations of such divergence shall be made clearly and readily available in the documentation. | ||||||
|
|
||||||
| All of the following interfaces shall be exposed on the global object accessible through `globalThis`, unless otherwise specified in this specification: | ||||||
| All of the following interfaces shall be exposed on the global object accessible through `globalThis`, unless otherwise specified in the present document: | ||||||
|
|
||||||
| * {{AbortController}} [[!DOM]] | ||||||
| * {{AbortSignal}} [[!DOM]] | ||||||
|
|
@@ -122,7 +122,7 @@ All of the following interfaces shall be exposed on the global object accessible | |||||
| * {{WritableStreamDefaultController}} [[!STREAMS]] | ||||||
| * {{WritableStreamDefaultWriter}} [[!STREAMS]] | ||||||
|
|
||||||
| All of the following methods and properties shall be exposed on the global object accessible through `globalThis`, unless otherwise specified in this specification: | ||||||
| All of the following methods and properties shall be exposed on the global object accessible through `globalThis`, unless otherwise specified in the present document: | ||||||
|
|
||||||
| * {{globalThis}} [[!ECMASCRIPT]] | ||||||
| * `globalThis.`{{atob()}} [[!HTML]] | ||||||
|
|
@@ -152,15 +152,15 @@ All of the following methods and properties shall be exposed on the global objec | |||||
|
|
||||||
| Web-interoperable runtimes that support workers shall also expose {{WorkerGlobalScope/onerror}}, | ||||||
| {{WorkerGlobalScope/onunhandledrejection}}, {{WorkerGlobalScope/onrejectionhandled}} and | ||||||
| {{WorkerGlobalScope/self}} on the worker's `globalThis`, | ||||||
| unless otherwise specified in this specification. [[!HTML]] | ||||||
| {{WorkerGlobalScope/self}} on the worker's `globalThis`, | ||||||
| unless otherwise specified in the current document. [[!HTML]] | ||||||
|
|
||||||
| The Global Scope {#global-scope} | ||||||
| ================================ | ||||||
|
|
||||||
| The exact type of the global scope (`globalThis`) can vary across runtimes. Most Web Platform APIs are defined in terms that assume Web Browser environments that specifically expose types like {{Window}}, {{WorkerGlobalScope}}, and so forth. To simplify conformance, all interfaces, methods, and properties defined by this specification shall be exposed on the runtime's relevant global scope (e.g., `globalThis.crypto`, `globalThis.ReadableStream`, etc). | ||||||
| The exact type of the global scope (`globalThis`) can vary across runtimes. Most Web Platform APIs are defined in terms that assume Web Browser environments that specifically expose types like {{Window}}, {{WorkerGlobalScope}}, and so forth. To simplify conformance, all interfaces, methods, and properties defined by the present document shall be exposed on the runtime's relevant global scope (e.g., `globalThis.crypto`, `globalThis.ReadableStream`, etc). | ||||||
|
|
||||||
| With many runtimes, adding a new global-scoped property can introduce breaking changes when the new global conflicts with existing application code. Many Web Platform APIs define global properties using [=read only|the `readonly` attribute=]. [[!WEBIDL]] To avoid introducing breaking changes, runtimes conforming to this specification may choose to ignore the `readonly` attribute for properties being added to the global scope. This allows users of these runtimes to delete or overwrite these properties if they conflict with existing application code. | ||||||
| With many runtimes, adding a new global-scoped property can introduce breaking changes when the new global conflicts with existing application code. Many Web Platform APIs define global properties using [=read only|the `readonly` attribute=]. [[!WEBIDL]] To avoid introducing breaking changes, runtimes conforming to the Minimum commone web API standard may choose to ignore the `readonly` attribute for properties being added to the global scope. This allows users of these runtimes to delete or overwrite these properties if they conflict with existing application code. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| The global object on {{Window}}-like and worker environments should always be an instance of {{EventTarget}}. Web-interoperable runtimes should follow the <a>report an exception</a> algorithm, and the JavaScript <a href="https://tc39.es/ecma262/#sec-host-promise-rejection-tracker">HostPromiseRejectionTracker</a> host hook, as defined in [[!HTML]]. This includes firing the {{Window/error}}, {{Window/unhandledrejection}} and {{Window/rejectionhandled}} events on the global object. | ||||||
|
|
||||||
|
|
||||||
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the MCA version submitted to the ExeCom, you made a number of editorial changes to the intro and scope, which we should probably incorporate into this version as well; but here both changes would conflict. The ExeCom draft has instead:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, thank you for that reminder. I'm gonna push a new commit that aligns with the published edition