diff --git a/source b/source index 877761a9424..eca5b56cf94 100644 --- a/source +++ b/source @@ -3123,6 +3123,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
mediablockingspecifiertitle attribute has special semantics on this element.The blocking
attribute is a blocking attribute.
The specifier
+ attribute defines an exportable specifier.
The title attribute on style elements defines
CSS style sheet sets. If the style element
@@ -18831,7 +18839,83 @@ console.log(style.disabled); // false
+
The user agent must run the create a declarative CSS module script algorithm when + all of the following conditions are true:
+ +The element is popped off the stack of open elements of an HTML + parser or XML parser.
The element is not on the stack of open elements of an HTML + parser or XML parser, and it becomes connected.
The create a declarative CSS module script algorithm is as follows:
+ +Let element be the style element.
If element is not connected, then return.
If element's type attribute is not present
+ or its value is not an ASCII case-insensitive match for
+ "module", then return.
If element's specifier attribute
+ is not present or its value is an empty string, then return.
If the Should element's inline behavior be blocked by Content Security
+ Policy? algorithm returns "Blocked" when executed upon the
+ style element, "style", and the style
+ element's child text content, then return. CSP
Let blobObject be a file containing the style element's
+ child text content with a type of
+ "text/css".
Let styleBlobURL be the result of adding a Blob entry + to the Blob URL Store.
Create a JSON object jsonObject with a single key of "imports"
+ whose value is a single JSON object containing a module specifier map with a key consisting
+ of the value of the specifier attribute and a value of
+ styleBlobURL.
Let jsonString be the result of calling JSON.stringify on + jsonObject.
Let importMapParseResult be the result of create an import map parse result + with input as jsonString and baseURL as the document base URL.
Register an import map using element's relevant global object + and importMapParseResult.
For example, a style element defined as follows:
+<style type="module" specifier="foo">body { background: navy; color: yellow; }</style>
+
+
+ Is equivalent to the following dynamically created import map definition:
+ +
+<script>
+ const blob_url = URL.createObjectURL(new Blob(["body { background: navy; color: yellow; }"], {type: "text/css"}));
+ const import_map = document.createElement("script");
+ import_map.setAttribute("type", "importmap");
+ const json_string = "{ \"imports\": { \"foo\": \"" + blob_url + "\" }}";
+ import_map.innerText = json_string;
+ document.body.appendChild(import_map);
+</script>
+ template elements with XSLT and XPathAuthors should not specify a type attribute on a
- style element. If the attribute is present, its value must be an ASCII
- case-insensitive match for "text/css".
style element unless it is intented to create a declarative CSS module
+ script. If the attribute is present, its value must be an ASCII
+ case-insensitive match for "text/css" or "module".
Authors should not specify the name attribute on
a elements. If the attribute is present, its value must not be the empty string and
@@ -148799,7 +148884,7 @@ if (s = prompt('What is your name?')) {
Use DOM events mechanisms to register event listeners. DOM
type on style elements (except as noted in the previous section)Omit the attribute for CSS; for data blocks, use +
Omit the attribute for CSS (unless used to create a declarative CSS module script); for data blocks, use
script as the container instead of style.
datapagesize on table elementsmedia;
- blockingblocking;
+ specifier
HTMLStyleElementtrue";
"false";
the empty string
+ specifier
+ style
+ src
audio;
@@ -156406,6 +156497,7 @@ INSERT INTERFACES HERE
Kristof Zelechovski,
Krzysztof Maczyński,
黒澤剛志 (Kurosawa Takeshi),
+ Kurt Catti-Schmidt,
Kyle Barnhart,
Kyle Hofmann,
Kyle Huey,