diff --git a/source b/source index 87cb865d988..eae33fba6e2 100644 --- a/source +++ b/source @@ -2738,6 +2738,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
The following terms are defined in the WHATWG MIME Sniffing standard:
RequestCredentials
enumerationRequestDestination
enumerationfetch()
methodThe following terms are defined in WebAssembly JavaScript Module Integration:
+ +a Source Text Module Record, for JavaScript module scripts;
a WebAssembly Module Record, for WebAssembly module scripts;
a Synthetic Module Record, for JSON module scripts; or
Module scripts can be classified into two types:
+Module scripts can be classified into three types:
A module script is a JavaScript module script if its record is a Source Text Module Record.
A module script is a WebAssembly module script if + its record is a WebAssembly Module + Record.
A module script is a JSON module script if its record is a Synthetic Module Record, and it @@ -88283,6 +88303,23 @@ interface ApplicationCache : EventTarget {
If type's essence is "application/wasm
", then:
Let bufferPromise be the result of running consume body on + response with ArrayBuffer.
Create a WebAssembly module + script given bufferPromise, module map settings object, + response's url, and + options. Wait until the algorithm asynchronously completes with + result.
Set module script to result.
If type is a JSON MIME type, then:
@@ -88551,6 +88588,43 @@ interface ApplicationCache : EventTarget {Return script.
To validate requested module specifiers + of a module record record for a script script:
+ +For each string requested of + record.[[RequestedModules]]:
+ +Let url be the result of resolving + a module specifier given script's base + URL and requested.
If url is failure, then:
+ +Let error be a new TypeError
exception.
Set script's parse error + to error.
Return.
Set script's record to + record.
This algorithm is essentially validating all of the requested module specifiers. We + treat a module with unresolvable module specifiers the same as one that cannot be parsed; in + both cases, a syntactic issue makes it impossible to ever contemplate instantiating the module + later.
+To create a JavaScript module script,
given a JavaScript string source, an environment settings
object settings, a URL baseURL, and some script
@@ -88595,39 +88669,78 @@ interface ApplicationCache : EventTarget {
- For each string requested of
- result.[[RequestedModules]]: Validate requested module specifiers of result with
+ script. Let url be the result of resolving
- a module specifier given script's base
- URL and requested. Return script. To create a WebAssembly module script,
+ given a promise that will resolve with an If scripting is disabled for
+ settings's responsible browsing context, then set
+ bufferPromise to a promise resolved with an empty
+ Let script be a new WebAssembly module script that this algorithm
+ will subsequently initialize. Set script's settings object to settings. Set script's base URL to
+ baseURL. Set script's fetch
+ options to options. Set script's parse error and
+ error to rethrow to null. Upon fulfillment of bufferPromise with buffer: If url is failure, then: Let module be the result of parse a WebAssembly module given
+ buffer, settings's Realm, and script. Let error be a new Passing script as the last parameter here ensures
+ result.[[HostDefined]] will be script. Set script's parse error
- to error. If this algorithm throws an exception, then catch it and perform the following steps: Set script's parse error to
+ the exception. Return script. Asynchronously complete this algorithm with script. This step is essentially validating all of the requested module specifiers. We
- treat a module with unresolvable module specifiers the same as one that cannot be parsed; in
- both cases, a syntactic issue makes it impossible to ever contemplate instantiating the module
- later. Validate requested module specifiers of module with
+ script. Asynchronously complete this algorithm with script. Set script's record to
- result. Upon rejection of bufferPromise with reason: Set script's parse error to
+ reason. Return script. Asynchronously complete this algorithm with script. To create a JSON module script, given a
@@ -122664,6 +122777,9 @@ INSERT INTERFACES HERE
-
+
+ ArrayBuffer
+ bufferPromise, an environment settings object settings, a
+ URL baseURL, and some script fetch options
+ options, run these steps. The algorithm will asynchronously complete with a new
+ WebAssembly module script.
+
- ArrayBuffer
.
-
-
TypeError
exception.
+
+
+ application/xml
application/wasm
image/gif