Skip to content

Commit d63b8ec

Browse files
committed
Accepted comments from TC53 review
1 parent 37ad4fd commit d63b8ec

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

index.bs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:fetch; type:method; text:fetch()
1717

1818
<h2 class="no-num" id="intro">Introduction</h2>
1919

20-
There is a wide base of ECMAScript runtime environments being used beyond web browsers, specifically in web server and edge platforms. An major benefit to this approach is the ability to use a single programming language across multiple contexts, reducing specialization and allowing for reuse of code across the server and client side.
20+
There is a wide base of ECMAScript runtime environments being used beyond web browsers, specifically in web server and edge platforms. A major benefit to this approach is the ability to use a single programming language across multiple contexts, reducing specialization and allowing for reuse of code across the server and client side.
2121

2222
Since code running in web browsers makes up the vast majority of ECMAScript code, runtimes are incentivised to support the same APIs as web browsers. However without a specification of which web platform APIs to be implemented, the resulting landscape provides poor interoperability across such environments.
2323

@@ -70,11 +70,11 @@ This Standard defines the 2025 snapshot of the Minimum common web API, a curated
7070
Conformance {#conformance}
7171
==========================
7272

73-
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 Standard, according to their definition in the corresponding W3C or WHATWG standard.
73+
A conforming implementation of this Standard shall provide the interfaces and properties listed in this specification, according to their definition in the corresponding W3C or WHATWG standard. A conforming implementation shall also conform to ECMA-262.
7474

75-
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.
75+
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. Extending API surface, even without modifying existing API behaviours, should be avoided as it can reduce interoperability and portability of code across runtimes.
7676

77-
This Standard does not prohibit implementing additional Web Platform APIs beyond those listed here.
77+
Runtimes may implement Web Platform APIs beyond those listed in this Standard.
7878

7979
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.
8080

@@ -96,14 +96,14 @@ The Web Platform is the combination of technology standards defined by organizat
9696
<dfn>Web-interoperable Runtime</dfn> {#term-web-interoperable-runtime}
9797
----------------------------------------------------------------------
9898

99-
Any ECMAScript-based application runtime environment that implements the subset of Web Platform APIs outlined in this Standard.
99+
Any ECMAScript-based runtime environment that implements this Standard. Web Browsers provide a Web-interoperable Runtime.
100100

101-
While this term is intentionally broad to also encompass Web Browsers, the primary focus here is on outlining expectations for non-browser runtimes.
101+
The term "Web-interoperable Runtime" is intentionally broad. The primary focus of this Standard is web server runtimes.
102102

103103
Common API Index {#api-index}
104104
=========================
105105

106-
All <a>Web-interoperable Runtimes</a> conforming to this Standard shall implement each of the following <a>Web Platform</a> 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.
106+
All <a>Web-interoperable Runtimes</a> conforming to this Standard shall implement each of the following <a>Web Platform</a> APIs. These should be implemented in accordance with their normative requirements except where modified here. Where any runtime environment must diverge from a normative requirement for technical or structural reasons, clear documentation shall be provided. Documentation shall include both explanation and impact of deviation.
107107

108108
All of the following interfaces shall be exposed on the global object accessible through `globalThis`, unless otherwise specified in this Standard:
109109

@@ -189,7 +189,7 @@ All of the following methods and properties shall be exposed on the global objec
189189
* `globalThis.`{{WebAssembly}}.{{WebAssembly/JSTag}} [[!WASM-JS-API-2]]
190190
* `globalThis.`{{WebAssembly}}.{{WebAssembly/validate()}} [[!WASM-JS-API-2]]
191191

192-
Web-interoperable runtimes that support workers shall also expose {{WorkerGlobalScope/onerror}},
192+
If web-interoperable runtimes support workers, they shall also expose {{WorkerGlobalScope/onerror}},
193193
{{WorkerGlobalScope/onunhandledrejection}}, {{WorkerGlobalScope/onrejectionhandled}} and
194194
{{WorkerGlobalScope/self}} on the worker's `globalThis`,
195195
unless otherwise specified in this Standard. [[!HTML]]
@@ -199,7 +199,7 @@ The Global Scope {#global-scope}
199199

200200
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 Standard shall be exposed on the runtime's relevant global scope (e.g., `globalThis.crypto`, `globalThis.ReadableStream`, etc).
201201

202-
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 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.
202+
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 Standard may omit 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.
203203

204204
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.
205205

@@ -218,6 +218,6 @@ The [=default `User-Agent` value=] is provided such that application code can re
218218
product-version = token
219219
</pre>
220220

221-
The [=default `User-Agent` value=] should be treated as a single, complete, opaque, unstructured value. It is recommended that the value be limited to a single `product` token excluding the optional `product-version`. The value should not include any `comment` components.
221+
The [=default `User-Agent` value=] should be treated by application code as a single, complete, opaque, unstructured value. It is recommended that the value be limited to a single `product` token excluding the optional `product-version`. The value should not include any `comment` components.
222222

223223
Note: For instance, `navigator.userAgent` could be set to `'MyRuntime'`.

0 commit comments

Comments
 (0)