diff --git a/source b/source index 9d749bd678d..1c5b0e9f148 100644 --- a/source +++ b/source @@ -2741,6 +2741,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
The following terms are defined in MIME Sniffing:
The contents of inline script elements, or the external script resource, must
conform with the requirements of the JavaScript specification's HTMLScriptElement : HTMLElement {
The contents of the external script resource for JSON module scripts must conform to the requirements of the JSON specification .
+The contents of the external script resource for style + sheet module scripts must conform to the requirements of the CSS Syntax specification + .
+When used to include data blocks, the data must be embedded
inline, the format of the data must be given using the type
attribute, and the contents of the script element must conform to the requirements
@@ -87510,7 +87539,10 @@ interface ApplicationCache : EventTarget {
script">JavaScript module scripts;
a Synthetic Module Record, for JSON - module scripts; or
a Synthetic Module Record, for style sheet module scripts; or
null, representing a parsing failure.
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 JSON module script if its record is a Synthetic Module Record, and it was created via the create a JSON module script algorithm. JSON module scripts represent a parsed JSON document.
-As JSON documents do not import dependent modules, and do not throw exceptions on evaluation, the fetch options and base URL of a JSON module script are always null.
A module script is a style sheet module script if its + record is a Synthetic Module Record, + and it was created via the create a style + sheet module script algorithm. Style sheet module scripts represent a parsed CSS style + sheet.
The active script is determined by the following algorithm:
@@ -88598,6 +88636,23 @@ interface ApplicationCache : EventTarget { +If the essence of type is text/css, then:
Let source text be the result of UTF-8 + decoding response's body.
Create a style sheet module + script given source text, module map settings object, + response's url, and options. + Wait until the algorithm asynchronously completes with result.
Set module script to result.
Set moduleMap[url] to module script, and asynchronously complete this algorithm with module script.
@@ -88836,6 +88891,61 @@ interface ApplicationCache : EventTarget {Return script.
To create a style sheet module script, + given a JavaScript string source, 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 style sheet module script.
+ +Let script be a new style sheet module script that this algorithm + will subsequently initialize.
Set script's settings object to settings.
Set script's base URL to + baseURL.
Set fetch options to + options.
Set script's parse error and + error to rethrow to null.
Let sheet be a new CSSStyleSheet object, as if the constructor
+ is called with no arguments.
Let promise be the result of invoking the replace() operation with text as an
+ argument.
Upon fulfillment of promise:
+ +Unset sheet's constructed flag.
Set script's record to the result + of creating a synthetic + module record with a default export of style sheet with + settings.
Asynchronously complete this algorithm with script.
Upon rejection of promise with reason:
+Set script's parse error to + reason.
Asynchronously complete this algorithm with script.
To create a synthetic module record with a default export of a JavaScript value value with an environment settings object settings:
@@ -123043,6 +123153,9 @@ INSERT INTERFACES HERE