From 7f91f78506230bf6c718fded72fd5346cc1f6637 Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Tue, 23 Sep 2025 16:58:47 -0700 Subject: [PATCH 01/19] Initial commit --- source | 165 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 164 insertions(+), 1 deletion(-) diff --git a/source b/source index 9caf2c50ee8..4edb165bcb0 100644 --- a/source +++ b/source @@ -4109,6 +4109,14 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • set up browsing context features
  • The clientX and clientY extension attributes of the MouseEvent interface
  • +
  • + Extensions to the DocumentOrShadowRoot Interface Mixin: + +
  • The following features and terms are defined in CSS Syntax: CSSSYNTAX

    @@ -17948,6 +17956,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:
    @@ -17962,6 +17971,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 }; @@ -18033,6 +18043,10 @@ console.log(style.disabled); // false

    The blocking attribute is a blocking attribute.

    +

    The specifier + attribute is defines an exportable specifier.

    +

    The title attribute on style elements defines CSS style sheet sets. If the style element @@ -18256,7 +18270,73 @@ 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 present + and 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 styleDataURI be the string "data:text/css," + appended with the of the child text content of the style + element.

    12. + +
    13. +

      Create a JSON object with the following properties:

      + +
        +
      1. A single key of "imports".
      2. +
      3. A single JSON value containing a module specifier map with a key consisting of + the value of specifier attribute and a value of a + UTF-8 percent-encoding of styleDataURI. +
      +
    14. +
    15. Perform parse an import map string with input as the resulting JSON + string from the prior step and baseURL as the document base URL.
    16. +
    + +
    + +

    For example, a style element defined as follows:

    + +
    
    +<style type="module" specifier="foo">body { background: navy; color: yellow; }</style>
    +    
    + +

    Is equivalent to the following import map definition:

    +
    
    +<script type="importmap">
    +{
    +  "imports": {
    +    "foo": "data%3Atext%2Fcss%2Cbody%20%7B%20background%3A%20navy%3B%20color%3A%20yellow%3B%20%7D"
    +  }
    +}
    +</script>
    +
    @@ -65545,6 +65625,7 @@ not-slash = %x0000-002E / %x0030-10FFFF
    shadowrootclonable
    shadowrootserializable
    shadowrootcustomelementregistry
    +
    shadowrootadoptedstylesheets
    Accessibility considerations:
    For authors.
    @@ -65613,6 +65694,10 @@ interface HTMLTemplateElement : HTMLElement { data-x="attr-template-shadowrootcustomelementregistry">shadowrootcustomelementregistry content attribute is a boolean attribute.

    +

    The shadowrootadoptedstylesheets content + attribute populates adoptedStyleSheets.

    +

    The template contents of a template element are not children of the element itself.

    @@ -65823,7 +65908,73 @@ interface HTMLTemplateElement : HTMLElement {
    +
    +

    The stylesheet adopting steps for template elements are:

    + +
      +
    1. If the value of + shadowrootadoptedstylesheets is + empty, then return.

    2. +
    3. Let adoptedStyleSheets be an empty array.

    4. + +
    5. For each unordered set of unique space-separated tokens in + specifier:

      +
        +
      1. Let url be the result of resolving + a module specifier given moduleScript and specifier.

        If + any errors occur, continue.
      2. +
      3. Let fetchClient be the current settings object.

      4. +
      5. Let destination be the empty string.

      6. +
      7. Let options be the default script fetch options.

      8. +
      9. Let settingsObject be the current settings object.

      10. +
      11. Let referrer be "client".

      12. +
      13. Let moduleRequest be a ModuleRequest Record with + specifier set to specifier

      14. +
      15. Perform fetch a single module script providing url, + fetchClient,destination,options, + settingsObject,referrer, and moduleRequest from the prior + steps.
      16. +
      17. If the prior step immediately succeeds, extract the CSSStyleSheet from the + response's record and append it to + adoptedStyleSheets. If any failure occurs, continue.
      18. +
      +
    6. +
    7. Set adoptedStyleSheets on the host + to adoptedStyleSheets.
    8. +
    + +
    + +

    This example demonstrates two equivalent methods to import CSS module scripts, the + first using the JavaScript import method and the second using the + shadowrootadoptedstylesheets + attribute.

    + +
    
    +<script type="importmap">
    +{
    +  "imports": {
    +    "foo": "data:text/css,div {color:blue}"
    +  }
    +}
    +</script>
    +<div id="host">
    +  <template shadowrootmode="open">
    +    <div>test</div>
    +    <script type="module">
    +      import styles from "foo" with { type: "css"};
    +      document.getElementById("host").shadowRoot.adoptedStyleSheets = [styles];
    +    </script>
    +  </template>
    +</div>
    +<div id="host_shadowrootadoptedstylesheets_attribute">
    +  <template shadowrootmode="open" shadowrootadoptedstylesheets="foo">
    +    <div>test</div>
    +  </template>
    +</div>
    + +
    @@ -146502,7 +146653,8 @@ interface External { text* globals; media; - blocking + blocking + specifier HTMLStyleElement @@ -148125,6 +148277,11 @@ interface External { option Whether the option is selected by default Boolean attribute + + shadowrootadoptedstylesheets + template + Sets adoptedStyleSheets on a declarative shadow root + Text shadowrootclonable template @@ -148194,6 +148351,11 @@ interface External { "true"; "false"; the empty string + + specifier + style + A specifier value used in a module specifier map + Text src audio; @@ -151209,6 +151371,7 @@ INSERT INTERFACES HERE Kristof Zelechovski, Krzysztof Maczyński, 黒澤剛志 (Kurosawa Takeshi), + Kurt Catti-Schmidt, Kyle Barnhart, Kyle Hofmann, Kyle Huey, From b8c96aeaa7c05dec365bcb34fad6eb20b4bbe0e7 Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Wed, 24 Sep 2025 14:39:57 -0700 Subject: [PATCH 02/19] Adding missing shadowrootadoptedstylesheets and other small fixes --- source | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source b/source index 4edb165bcb0..55637587841 100644 --- a/source +++ b/source @@ -65620,6 +65620,7 @@ not-slash = %x0000-002E / %x0030-10FFFF
    Nothing (for clarification, see example).
    Content attributes:
    Global attributes
    +
    shadowrootadoptedstylesheets
    shadowrootmode
    shadowrootdelegatesfocus
    shadowrootclonable
    @@ -65637,6 +65638,7 @@ interface HTMLTemplateElement : HTMLElement { [HTMLConstructor] constructor(); readonly attribute DocumentFragment content; + [CEReactions, Reflect] attribute DOMString shadowRootAdoptedStyleSheets; [CEReactions] attribute DOMString shadowRootMode; [CEReactions, Reflect] attribute boolean shadowRootDelegatesFocus; [CEReactions, Reflect] attribute boolean shadowRootClonable; @@ -65918,8 +65920,8 @@ interface HTMLTemplateElement : HTMLElement { empty, then return.

  • Let adoptedStyleSheets be an empty array.

  • -
  • For each unordered set of unique space-separated tokens in - specifier:

    +
  • For each unordered set of unique space-separated tokens specifier in + shadowrootadoptedstylesheets:

    1. Let url be the result of resolving a module specifier given moduleScript and specifier.

      If @@ -146760,6 +146762,7 @@ interface External { colgroup* empty globals; + shadowrootadoptedstylesheets; shadowrootmode; shadowrootdelegatesfocus; shadowrootclonable; From 4487b30e87ef4163df43b7a73561d49a2f9a9312 Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Wed, 24 Sep 2025 14:52:07 -0700 Subject: [PATCH 03/19] Addressing Hoch's feedback --- source | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source b/source index 55637587841..d34987ecc66 100644 --- a/source +++ b/source @@ -18044,7 +18044,7 @@ console.log(style.disabled); // false attribute is a blocking attribute.

      The specifier - attribute is defines an exportable specifier.

      The

      • 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:

      @@ -18301,7 +18304,7 @@ console.log(style.disabled); // false
      element's child text content, then return. CSP

    2. Let styleDataURI be the string "data:text/css," - appended with the of the child text content of the style + appended with the child text content of the style element.

    3. @@ -65698,7 +65701,8 @@ interface HTMLTemplateElement : HTMLElement {

      The shadowrootadoptedstylesheets content - attribute populates adoptedStyleSheets.

      + contributes to the host's + adoptedStyleSheets.

      The template contents of a template element are not children of the element itself.

      @@ -65963,11 +65967,11 @@ interface HTMLTemplateElement : HTMLElement { </script> <div id="host"> <template shadowrootmode="open"> - <div>test</div> <script type="module"> import styles from "foo" with { type: "css"}; document.getElementById("host").shadowRoot.adoptedStyleSheets = [styles]; </script> + <div>test</div> </template> </div> <div id="host_shadowrootadoptedstylesheets_attribute"> From fde2e28f209093334190c1f64b1967320f370240 Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Wed, 24 Sep 2025 15:06:18 -0700 Subject: [PATCH 04/19] Fixing order and removing duplicate shadowrootadoptedstylesheets --- source | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source b/source index d34987ecc66..26b79afd053 100644 --- a/source +++ b/source @@ -65623,7 +65623,6 @@ not-slash = %x0000-002E / %x0030-10FFFF
      Nothing (for clarification, see example).
      Content attributes:
      Global attributes
      -
      shadowrootadoptedstylesheets
      shadowrootmode
      shadowrootdelegatesfocus
      shadowrootclonable
      @@ -65641,12 +65640,12 @@ interface HTMLTemplateElement : HTMLElement { [HTMLConstructor] constructor(); readonly attribute DocumentFragment content; - [CEReactions, Reflect] attribute DOMString shadowRootAdoptedStyleSheets; [CEReactions] attribute DOMString shadowRootMode; [CEReactions, Reflect] attribute boolean shadowRootDelegatesFocus; [CEReactions, Reflect] attribute boolean shadowRootClonable; [CEReactions, Reflect] attribute boolean shadowRootSerializable; [CEReactions, Reflect] attribute DOMString shadowRootCustomElementRegistry; + [CEReactions, Reflect] attribute DOMString shadowRootAdoptedStyleSheets; };
      Uses HTMLTemplateElement.
      @@ -146766,12 +146765,12 @@ interface External { colgroup* empty globals; - shadowrootadoptedstylesheets; shadowrootmode; shadowrootdelegatesfocus; shadowrootclonable; shadowrootserializable; - shadowrootcustomelementregistry + shadowrootcustomelementregistry; + shadowrootadoptedstylesheets HTMLTemplateElement From 141c474ce083d583fcc0fc0821feb78f7da0cc51 Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Thu, 25 Sep 2025 16:21:00 -0700 Subject: [PATCH 05/19] Fixing shadowrootadoptedstylesheets to definition to not include clonable --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index 26b79afd053..86e41c3df4e 100644 --- a/source +++ b/source @@ -148284,8 +148284,8 @@ interface External { Whether the option is selected by default Boolean attribute - shadowrootadoptedstylesheets - template + shadowrootadoptedstylesheets + template Sets adoptedStyleSheets on a declarative shadow root Text From c1748206e5d71e76da42005046ffb7c0e1d595f1 Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Fri, 26 Sep 2025 14:38:11 -0700 Subject: [PATCH 06/19] Wrapping algorithm per new requirements --- source | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source b/source index 86e41c3df4e..2f0513b979e 100644 --- a/source +++ b/source @@ -18281,6 +18281,7 @@ console.log(style.disabled); // false parser or XML parser, and it becomes connected.

    4. +

      The create a declarative CSS module script algorithm is as follows:

        @@ -18320,6 +18321,7 @@ console.log(style.disabled); // false
      1. Perform parse an import map string with input as the resulting JSON string from the prior step and baseURL as the document base URL.
      +
      @@ -65915,6 +65917,7 @@ interface HTMLTemplateElement : HTMLElement {
      +

      The stylesheet adopting steps for template elements are:

        @@ -65948,6 +65951,7 @@ interface HTMLTemplateElement : HTMLElement {
      1. Set adoptedStyleSheets on the host to adoptedStyleSheets.
      +
      @@ -148359,8 +148363,8 @@ interface External { the empty string specifier - style - A specifier value used in a module specifier map + style + A specifier value used in a module specifier map Text src From 477caa7374539d527cb40b4bf5663c7f6341c707 Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Fri, 26 Sep 2025 14:48:35 -0700 Subject: [PATCH 07/19] Fixing formatting --- source | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source b/source index 2f0513b979e..819e83d97ad 100644 --- a/source +++ b/source @@ -18313,9 +18313,10 @@ console.log(style.disabled); // false
      1. A single key of "imports".
      2. -
      3. A single JSON value containing a module specifier map with a key consisting of - the value of specifier attribute and a value of a - UTF-8 percent-encoding of styleDataURI. +
      4. A single JSON value containing a module specifier map with a key consisting + of the value of specifier attribute and a value + of a UTF-8 percent-encoding of + styleDataURI.
    5. Perform parse an import map string with input as the resulting JSON From ccac8fe3f9873328a93301ea884874173305eba1 Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Fri, 26 Sep 2025 16:31:49 -0700 Subject: [PATCH 08/19] Fixing
    6. conformance error --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 18c82aadb80..34589aee63c 100644 --- a/source +++ b/source @@ -4131,7 +4131,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
    7. The scrollend event
    8. set up browsing context features
    9. The clientX and clientY extension attributes of the MouseEvent interface
    10. -
    11. Extensions to the DocumentOrShadowRoot Interface Mixin: @@ -4140,6 +4139,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
    12. adoptedStyleSheets
    13. +

      The following features and terms are defined in CSS Syntax: CSSSYNTAX

      From 746cdad76568e0d44c41d06972d9cab335107410 Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Mon, 29 Sep 2025 11:46:14 -0700 Subject: [PATCH 09/19] Simplifying stylesheet adopting steps --- source | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/source b/source index 34589aee63c..8e7568a98b8 100644 --- a/source +++ b/source @@ -68217,21 +68217,17 @@ interface HTMLTemplateElement : HTMLElement {
      1. Let url be the result of resolving a module specifier given moduleScript and specifier.

        If - any errors occur, continue.
      2. -
      3. Let fetchClient be the current settings object.

      4. -
      5. Let destination be the empty string.

      6. -
      7. Let options be the default script fetch options.

      8. + any errors occur, then continue.
      9. Let settingsObject be the current settings object.

      10. -
      11. Let referrer be "client".

      12. -
      13. Let moduleRequest be a ModuleRequest Record with - specifier set to specifier

      14. -
      15. Perform fetch a single module script providing url, - fetchClient,destination,options, - settingsObject,referrer, and moduleRequest from the prior - steps.
      16. -
      17. If the prior step immediately succeeds, extract the CSSStyleSheet from the - response's record and append it to - adoptedStyleSheets. If any failure occurs, continue.
      18. +
      19. Let moduleType be "css".

      20. +
      21. Let moduleMap be settingsObject's module map.

      22. +
      23. Let moduleScript be + moduleMap[(url, moduleType)].

      24. +
      25. If moduleScript is null, then continue.

      26. +
      27. Extract the CSSStyleSheet from moduleScript's + record and append it to + adoptedStyleSheets. If any error occurs, then continue.

    14. Set adoptedStyleSheets on the host From ca450c7be46549027234b4f3ebd8b8ced2cd1383 Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Mon, 29 Sep 2025 11:56:43 -0700 Subject: [PATCH 10/19] Making stylesheet adopting steps append instead of set --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index 8e7568a98b8..1add8ed51ba 100644 --- a/source +++ b/source @@ -68230,8 +68230,8 @@ interface HTMLTemplateElement : HTMLElement { adoptedStyleSheets. If any error occurs, then continue.

  • -
  • Set adoptedStyleSheets on the host - to adoptedStyleSheets.
  • +
  • Append adoptedStyleSheets to the + host's to adoptedStyleSheets.

  • From d8cae136f4dbc3a51ffe9c22ac890ef24ff7028d Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Mon, 29 Sep 2025 12:44:09 -0700 Subject: [PATCH 11/19] Fixing typo --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 1add8ed51ba..e2ea75b18a8 100644 --- a/source +++ b/source @@ -68231,7 +68231,7 @@ interface HTMLTemplateElement : HTMLElement {
  • Append adoptedStyleSheets to the - host's to adoptedStyleSheets.

  • + host's adoptedStyleSheets.

    From 11fcb56a9b8a7174cfa1d7175e360ad1008e5161 Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Mon, 6 Oct 2025 13:40:07 -0700 Subject: [PATCH 12/19] Addressing Dan's feedback --- source | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/source b/source index e2ea75b18a8..57aefba759b 100644 --- a/source +++ b/source @@ -4135,7 +4135,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute Extensions to the DocumentOrShadowRoot Interface Mixin:
      -
    • styleSheets
    • adoptedStyleSheets
    @@ -18867,8 +18866,8 @@ console.log(style.disabled); // false https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2740 https://github.com/w3c/csswg-drafts/issues/3096 --> -
  • If element's type attribute is present - and its value is not an ASCII case-insensitive match for +

  • 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 @@ -18880,22 +18879,19 @@ console.log(style.disabled); // false element's child text content, then return. CSP

  • Let styleDataURI be the string "data:text/css," - appended with the child text content of the style - element.

  • + appended with the result of running UTF-8 percent-encode + on the child text content of the style element.

    -
  • -

    Create a JSON object with the following properties:

    +
  • Create a JSON string jsonString with a single key of "imports" + whose value is a single JSON string containing a module specifier map with a key consisting + of the value of the specifier attribute and a value of + styleDataURI.

  • -
      -
    1. A single key of "imports".
    2. -
    3. A single JSON value containing a module specifier map with a key consisting - of the value of specifier attribute and a value - of a UTF-8 percent-encoding of - styleDataURI.
    4. -
    - -
  • Perform parse an import map string with input as the resulting JSON - string from the prior step and baseURL as the document base URL.
  • +
  • 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 the resulting import map parse result from the prior step.

  • @@ -68230,7 +68226,7 @@ interface HTMLTemplateElement : HTMLElement { adoptedStyleSheets. If any error occurs, then continue.

    -
  • Append adoptedStyleSheets to the +

  • Extend adoptedStyleSheets to the host's adoptedStyleSheets.

  • @@ -140386,6 +140382,10 @@ document.body.appendChild(text); data-x="attr-template-shadowrootcustomelementregistry">shadowrootcustomelementregistry attribute, then set shadow's keep custom element registry null to true.

    + +
  • If templateStartTag has a shadowrootadoptedstylesheets + attribute, then perform stylesheet adopting steps on template

  • From 9e2f7ee69bc8bb95df1cdba5bb4eca1443e3a765 Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Mon, 6 Oct 2025 14:11:51 -0700 Subject: [PATCH 13/19] Minor style fixes --- source | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source b/source index 57aefba759b..0e878d8a30a 100644 --- a/source +++ b/source @@ -18909,7 +18909,7 @@ console.log(style.disabled); // false <script type="importmap"> { "imports": { - "foo": "data%3Atext%2Fcss%2Cbody%20%7B%20background%3A%20navy%3B%20color%3A%20yellow%3B%20%7D" + "foo": "data:text/css,body%20%7B%20background%3A%20navy%3B%20color%3A%20yellow%3B%20%7D" } } </script> @@ -140385,7 +140385,7 @@ document.body.appendChild(text);
  • If templateStartTag has a shadowrootadoptedstylesheets - attribute, then perform stylesheet adopting steps on template

  • + attribute, then perform stylesheet adopting steps on template.

    @@ -151856,7 +151856,7 @@ interface External { text* globals; media; - blocking + blocking; specifier HTMLStyleElement From b2c6025b1fbfd49ea043ae9a688f53f2a2e78028 Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Tue, 7 Oct 2025 17:59:48 -0700 Subject: [PATCH 14/19] Addressing Dan's second round of feedback --- source | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/source b/source index 0e878d8a30a..35a496f0a52 100644 --- a/source +++ b/source @@ -18887,11 +18887,14 @@ console.log(style.disabled); // false of the value of the specifier attribute and a value of styleDataURI.

    -
  • Create an import map parse result with input as jsonString - and baseURL as the document base URL.

  • +
  • 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 the resulting import map parse result from the prior step.

  • +
  • If importMapParseResult's error to rethrow is + not null, then continue.

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

  • @@ -68226,8 +68229,8 @@ interface HTMLTemplateElement : HTMLElement { adoptedStyleSheets. If any error occurs, then continue.

    -
  • Extend adoptedStyleSheets to the - host's adoptedStyleSheets.

  • +
  • Extend host's + adoptedStyleSheets with adoptedStyleSheets.

  • @@ -140385,7 +140388,7 @@ document.body.appendChild(text);
  • If templateStartTag has a shadowrootadoptedstylesheets - attribute, then perform stylesheet adopting steps on template.

  • + attribute, then perform the stylesheet adopting steps on template.

    From adf1484c6967110cb7362593fc294a641a1d2857 Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Thu, 9 Oct 2025 16:00:35 -0700 Subject: [PATCH 15/19] Updating external URL references to draft URL's --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index 35a496f0a52..2cf401025ba 100644 --- a/source +++ b/source @@ -4133,9 +4133,9 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • The clientX and clientY extension attributes of the MouseEvent interface
  • Extensions to the DocumentOrShadowRoot Interface Mixin: + data-x-href="https://drafts.csswg.org/cssom/#extensions-to-the-document-or-shadow-root-interface">Extensions to the DocumentOrShadowRoot Interface Mixin:
      -
    • adoptedStyleSheets
    • +
    • adoptedStyleSheets
  • From 05edbede6604b96eda259deac55817a1814a1bef Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Thu, 9 Oct 2025 16:17:34 -0700 Subject: [PATCH 16/19] Adding component percent-encode set per Anne's feedback --- source | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source b/source index 2cf401025ba..5567e73e504 100644 --- a/source +++ b/source @@ -18878,9 +18878,12 @@ console.log(style.disabled); // false style element, "style", and the style element's child text content, then return. CSP

    +
  • Let encodedStyle be the result of running UTF-8 percent-encode on + the child text content of the style element using the + component percent-encode set.

  • +
  • Let styleDataURI be the string "data:text/css," - appended with the result of running UTF-8 percent-encode - on the child text content of the style element.

  • + appended with the contents of encodedStyle.

  • Create a JSON string jsonString with a single key of "imports" whose value is a single JSON string containing a module specifier map with a key consisting From 6cee43f6fdac04c9b44574933a6aa41305c7e272 Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Thu, 9 Oct 2025 16:39:36 -0700 Subject: [PATCH 17/19] Separating JSON string step into a JSON object + stringify --- source | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source b/source index 5567e73e504..51157e71aff 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
  • @@ -18885,11 +18886,14 @@ console.log(style.disabled); // false
  • Let styleDataURI be the string "data:text/css," appended with the contents of encodedStyle.

  • -
  • Create a JSON string jsonString with a single key of "imports" - whose value is a single JSON string containing a module specifier map with a key consisting +

  • 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 styleDataURI.

  • +
  • 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.

  • From 6a95872e8024efc56afaac8d95c6ca7472dfb5cc Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Fri, 10 Oct 2025 13:42:45 -0700 Subject: [PATCH 18/19] Updating wording on the 'type' attribute being obselete --- source | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source b/source index 51157e71aff..da1274823e4 100644 --- a/source +++ b/source @@ -148656,9 +148656,9 @@ if (s = prompt('What is your name?')) { attribute on script elements that is the empty string or a JavaScript MIME type 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".

    +

    Authors should not specify a value for the type + attribute on style elements that is an ASCII case-insensitive match for + "text/css". Instead, they should omit the attribute, which has the same effect.

    Authors should not specify the name attribute on a elements. If the attribute is present, its value must not be the empty string and From 188162aa88f3d75ce3c9ec42e3d698013f5dd6b7 Mon Sep 17 00:00:00 2001 From: Kurt Catti-Schmidt Date: Mon, 20 Oct 2025 09:37:04 -0700 Subject: [PATCH 19/19] Converting Import Map to Blob --- source | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/source b/source index da1274823e4..fcab0e82a65 100644 --- a/source +++ b/source @@ -18879,17 +18879,17 @@ console.log(style.disabled); // false style element, "style", and the style element's child text content, then return. CSP

    -
  • Let encodedStyle be the result of running UTF-8 percent-encode on - the child text content of the style element using the - component percent-encode set.

  • +
  • Let styleBlob be the result of creating a Blob object representing + a file containing the style element's child text content with a + type of "text/css".

  • -
  • Let styleDataURI be the string "data:text/css," - appended with the contents of encodedStyle.

  • +
  • Let styleBlobURL be the blob URL entry + associated with styleBlob.

  • 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 - styleDataURI.

  • + styleBlobURL.

  • Let jsonString be the result of calling JSON.stringify on jsonObject.

  • @@ -18913,15 +18913,16 @@ console.log(style.disabled); // false <style type="module" specifier="foo">body { background: navy; color: yellow; }</style> -

    Is equivalent to the following import map definition:

    +

    Is equivalent to the following dynamically created import map definition:

    
    -<script type="importmap">
    -{
    -  "imports": {
    -    "foo": "data:text/css,body%20%7B%20background%3A%20navy%3B%20color%3A%20yellow%3B%20%7D"
    -  }
    -}
    +<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>