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
  • The IsDataDescriptor abstract operation
  • The IsDetachedBuffer abstract operation
  • The IsSharedArrayBuffer abstract operation
  • +
  • The JSON.stringify abstract operation
  • The NewObjectEnvironment abstract operation
  • The NormalCompletion abstract operation
  • @@ -3544,6 +3545,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • Blob URL Store
  • blob URL entry and its environment
  • +
  • Add a Blob entry
  • The obtain a blob object algorithm
  • @@ -18513,6 +18515,7 @@ people expect to have work and what is necessary.
    Global attributes
    media
    blocking
    +
    specifier
    Also, the title attribute has special semantics on this element.
    Accessibility considerations:
    @@ -18527,6 +18530,7 @@ interface HTMLStyleElement : HTMLElement { attribute boolean disabled; [CEReactions, Reflect] attribute DOMString media; [SameObject, PutForwards=value, Reflect] readonly attribute DOMTokenList blocking; + [SameObject, PutForwards=value, Reflect] readonly attribute DOMString specifier; // also has obsolete members }; @@ -18602,6 +18606,10 @@ console.log(style.disabled); // false

    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 create a declarative CSS module script algorithm is as follows:

    + +
      +
    1. Let element be the style element.

    2. + +
    3. If element is not connected, then return.

    4. + + +
    5. If element's type attribute is not present + or its value is not an ASCII case-insensitive match for + "module", then return.

    6. + +
    7. If element's specifier attribute + is not present or its value is an empty string, then return.

    8. + +
    9. 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

    10. + +
    11. Let blobObject be a file containing the style element's + child text content with a type of + "text/css".

    12. + +
    13. Let styleBlobURL be the result of adding a Blob entry + to the Blob URL Store.

    14. + +
    15. 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.

    16. + +
    17. Let jsonString be the result of calling JSON.stringify on + jsonObject.

    18. + +
    19. Let importMapParseResult be the result of create an import map parse result + with input as jsonString and baseURL as the document base URL.

    20. + +
    21. Register an import map using element's relevant global object + and importMapParseResult.

    22. +
    +
    + +
    +

    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>
    +
    @@ -68108,8 +68192,6 @@ interface HTMLTemplateElement : HTMLElement {
    - -
    Interaction of template elements with XSLT and XPath
    @@ -140229,6 +140311,7 @@ document.body.appendChild(text); data-x="attr-template-shadowrootcustomelementregistry">shadowrootcustomelementregistry attribute, then set shadow's keep custom element registry null to true.

    + @@ -148490,8 +148573,10 @@ if (s = prompt('What is your name?')) { essence match. Instead, they should omit the attribute, which has the same effect.

    Authors 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 elements
    @@ -151699,7 +151784,8 @@ interface External { text* globals; media; - blocking + blocking; + specifier HTMLStyleElement @@ -153391,6 +153477,11 @@ interface External { "true"; "false"; the empty string + + specifier + style + A specifier value used in a module specifier map + Text 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,