From cfc5109a9cb2b7d6dd1fd3993c524b7fcc02eb9d Mon Sep 17 00:00:00 2001 From: Jayson Chen Date: Mon, 1 Dec 2025 23:38:18 -0800 Subject: [PATCH 1/9] Modify element adoption SCER --- dom.bs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/dom.bs b/dom.bs index bcba75ec..77470732 100644 --- a/dom.bs +++ b/dom.bs @@ -6083,8 +6083,26 @@ algorithm is passed node and oldDocument, as
  • If inclusiveDescendant's custom element registry is null or inclusiveDescendant's custom element registry's is scoped is false, then set - inclusiveDescendant's custom element registry to - document's effective global custom element registry. + inclusiveDescendant's custom element registry based on the + following conditions: + +

      +
    1. If inclusiveDescendant's parent is null or + inclusiveDescendant's parent is a {{DocumentFragment}} but not + a {{ShadowRoot}}, then set inclusiveDescendant's + custom element registry to document's + effective global custom element registry. + +

    2. If inclusiveDescendant's parent's + custom element registry is null or is equal to document's + effective global custom element registry, then set inclusiveDescendant's + custom element registry to inclusiveDescendant's + parent's custom element registry. + +

    3. Otherwise, set inclusiveDescendant's + custom element registry to document's + effective global custom element registry. +

    From 1dc85e4a711667fb053f946ad180b09f64428b54 Mon Sep 17 00:00:00 2001 From: Jayson Chen Date: Tue, 2 Dec 2025 06:46:11 -0800 Subject: [PATCH 2/9] Use effective global custom element registry as discussed --- dom.bs | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/dom.bs b/dom.bs index 77470732..570a4819 100644 --- a/dom.bs +++ b/dom.bs @@ -4891,7 +4891,7 @@ and an optional document docume
  • If shadowRootRegistry is a global custom element registry, then set shadowRootRegistry to document's - effective global custom element registry. + custom element registry's effective global custom element registry.

  • Attach a shadow root with copy, node's shadow root's mode, true, node's @@ -4936,7 +4936,8 @@ and an optional document docume fallbackRegistry.

  • If registry is a global custom element registry, then set - registry to document's effective global custom element registry. + registry to document's custom element registry + effective global custom element registry.

  • Set copy to the result of creating an element, given document, node's local name, node's @@ -6071,7 +6072,8 @@ algorithm is passed node and oldDocument, as

    then set inclusiveDescendant's custom element registry to - document's effective global custom element registry. + document's custom element registry's + effective global custom element registry.

  • Otherwise, if inclusiveDescendant is an element: @@ -6082,26 +6084,21 @@ algorithm is passed node and oldDocument, as

  • If inclusiveDescendant's custom element registry is null or inclusiveDescendant's custom element registry's - is scoped is false, then set - inclusiveDescendant's custom element registry based on the - following conditions: + is scoped is false:

    1. If inclusiveDescendant's parent is null or inclusiveDescendant's parent is a {{DocumentFragment}} but not a {{ShadowRoot}}, then set inclusiveDescendant's custom element registry to document's + custom element registry's effective global custom element registry. -

    2. If inclusiveDescendant's parent's - custom element registry is null or is equal to document's - effective global custom element registry, then set inclusiveDescendant's - custom element registry to inclusiveDescendant's - parent's custom element registry. - -

    3. Otherwise, set inclusiveDescendant's - custom element registry to document's - effective global custom element registry. +

    4. Otherwise, let registry be the result of + looking up a custom element registry given inclusiveDescendant's + parent; set inclusiveDescendant's + custom element registry to registry's + effective global custom element registry

    @@ -6145,13 +6142,12 @@ algorithm is passed node and oldDocument, as is a global custom element registry if registry is non-null and registry's is scoped is false.

    -

    A document document's effective global custom element registry -is: +

    Null or a {{CustomElementRegistry}} object registry's +effective global custom element registry is:

      -
    1. If document's custom element registry - is a global custom element registry, then return document's - custom element registry. +

    2. If registry is a global custom element registry, then return + registry

    3. Return null.

    From 697020b833784c9e3b6e4f011a410e467c18e231 Mon Sep 17 00:00:00 2001 From: Jayson Chen Date: Tue, 2 Dec 2025 08:21:36 -0800 Subject: [PATCH 3/9] Update steps --- dom.bs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/dom.bs b/dom.bs index 570a4819..782ed9c5 100644 --- a/dom.bs +++ b/dom.bs @@ -6087,18 +6087,19 @@ algorithm is passed node and oldDocument, as is scoped is false:
      +
    1. Let registry be null. +

    2. If inclusiveDescendant's parent is null or inclusiveDescendant's parent is a {{DocumentFragment}} but not - a {{ShadowRoot}}, then set inclusiveDescendant's - custom element registry to document's - custom element registry's - effective global custom element registry. + a {{ShadowRoot}}, then set registry to document's + custom element registry. -

    3. Otherwise, let registry be the result of +

    4. Otherwise, set registry to the result of looking up a custom element registry given inclusiveDescendant's - parent; set inclusiveDescendant's - custom element registry to registry's - effective global custom element registry + parent. + +

    5. Set inclusiveDescendant's custom element registry + to registry's effective global custom element registry.

    @@ -6147,7 +6148,7 @@ algorithm is passed node and oldDocument, as
    1. If registry is a global custom element registry, then return - registry + registry.

    2. Return null.

    From ee404fe4a1914a8fce20d03d73ab063ff9360231 Mon Sep 17 00:00:00 2001 From: Jayson Chen Date: Tue, 2 Dec 2025 08:47:24 -0800 Subject: [PATCH 4/9] Fix indentation --- dom.bs | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/dom.bs b/dom.bs index 782ed9c5..34a85dbe 100644 --- a/dom.bs +++ b/dom.bs @@ -6082,25 +6082,26 @@ algorithm is passed node and oldDocument, as
  • Set the node document of each attribute in inclusiveDescendant's attribute list to document. -

  • If inclusiveDescendant's custom element registry is null - or inclusiveDescendant's custom element registry's - is scoped is false: +

  • +

    If inclusiveDescendant's custom element registry is null + or inclusiveDescendant's custom element registry's + is scoped is false: -

      -
    1. Let registry be null. +

        +
      1. Let registry be null. -

      2. If inclusiveDescendant's parent is null or - inclusiveDescendant's parent is a {{DocumentFragment}} but not - a {{ShadowRoot}}, then set registry to document's - custom element registry. +

      3. If inclusiveDescendant's parent is null or + inclusiveDescendant's parent is a {{DocumentFragment}} but not + a {{ShadowRoot}}, then set registry to document's + custom element registry. -

      4. Otherwise, set registry to the result of - looking up a custom element registry given inclusiveDescendant's - parent. +

      5. Otherwise, set registry to the result of + looking up a custom element registry given inclusiveDescendant's + parent. -

      6. Set inclusiveDescendant's custom element registry - to registry's effective global custom element registry. -

      +
    2. Set inclusiveDescendant's custom element registry + to registry's effective global custom element registry. +

    From a334c2ae69cf4bbaa16b203d99200fd8f69c7251 Mon Sep 17 00:00:00 2001 From: Jayson Chen Date: Tue, 2 Dec 2025 09:02:03 -0800 Subject: [PATCH 5/9] Fix fix indentation --- dom.bs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/dom.bs b/dom.bs index 34a85dbe..72680e17 100644 --- a/dom.bs +++ b/dom.bs @@ -6087,21 +6087,21 @@ algorithm is passed node and oldDocument, as or inclusiveDescendant's custom element registry's is scoped is false: -
      -
    1. Let registry be null. +

        +
      1. Let registry be null. -

      2. If inclusiveDescendant's parent is null or - inclusiveDescendant's parent is a {{DocumentFragment}} but not - a {{ShadowRoot}}, then set registry to document's - custom element registry. +

      3. If inclusiveDescendant's parent is null or + inclusiveDescendant's parent is a {{DocumentFragment}} but not + a {{ShadowRoot}}, then set registry to document's + custom element registry. -

      4. Otherwise, set registry to the result of - looking up a custom element registry given inclusiveDescendant's - parent. +

      5. Otherwise, set registry to the result of + looking up a custom element registry given inclusiveDescendant's + parent. -

      6. Set inclusiveDescendant's custom element registry - to registry's effective global custom element registry. -

      +
    2. Set inclusiveDescendant's custom element registry + to registry's effective global custom element registry. +

    From 90fc49c9b88029867ef7f26fe4a74924ca736bf2 Mon Sep 17 00:00:00 2001 From: Jayson Chen Date: Fri, 5 Dec 2025 06:10:02 -0800 Subject: [PATCH 6/9] simply logic --- dom.bs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dom.bs b/dom.bs index 72680e17..13916e25 100644 --- a/dom.bs +++ b/dom.bs @@ -6090,7 +6090,8 @@ algorithm is passed node and oldDocument, as
    1. Let registry be null. -

    2. If inclusiveDescendant's parent is null or +

    3. If inclusiveDescendant's custom element registry + is non-null or inclusiveDescendant's parent is null or inclusiveDescendant's parent is a {{DocumentFragment}} but not a {{ShadowRoot}}, then set registry to document's custom element registry. From 79b21f3bb592f55cccc46147fdeacacd0641c06a Mon Sep 17 00:00:00 2001 From: Jayson Chen Date: Sun, 7 Dec 2025 20:03:36 -0800 Subject: [PATCH 7/9] Update dom.bs Co-authored-by: Anne van Kesteren --- dom.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom.bs b/dom.bs index 13916e25..12edca8b 100644 --- a/dom.bs +++ b/dom.bs @@ -6090,8 +6090,8 @@ algorithm is passed node and oldDocument, as

      1. Let registry be null. -

      2. If inclusiveDescendant's custom element registry - is non-null or inclusiveDescendant's parent is null or +

      3. If inclusiveDescendant's custom element registry is + non-null, inclusiveDescendant's parent is null, or inclusiveDescendant's parent is a {{DocumentFragment}} but not a {{ShadowRoot}}, then set registry to document's custom element registry. From fdf774901f01bfbfaa18258249b4a79cb874b4e1 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Mon, 8 Dec 2025 09:12:12 +0100 Subject: [PATCH 8/9] Update build.yml --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f10e74c9..f6bf113a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,14 +12,14 @@ on: jobs: build: name: Build - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 2 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: - python-version: "3.11" + python-version: "3.14" - run: pip install bikeshed && bikeshed update # Note: `make deploy` will do a deploy dry run on PRs. - run: make deploy From cb655e437af3907f8f9305e7f3dd6db9fafbf642 Mon Sep 17 00:00:00 2001 From: Jayson Chen Date: Tue, 9 Dec 2025 00:53:01 -0800 Subject: [PATCH 9/9] Add element's keep custom element registry null concept --- dom.bs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dom.bs b/dom.bs index 12edca8b..f3be9899 100644 --- a/dom.bs +++ b/dom.bs @@ -6084,7 +6084,8 @@ algorithm is passed node and oldDocument, as

      4. If inclusiveDescendant's custom element registry is null - or inclusiveDescendant's custom element registry's + and inclusiveDescendant's keep custom element registry null + is false; or inclusiveDescendant's custom element registry's is scoped is false:

          @@ -6762,6 +6763,9 @@ developers to pass a {{ShadowRoot}} node instead of a dictionary to {{Element/at
          custom element registry
          Null or a {{CustomElementRegistry}} object. +
          keep custom element registry null +
          A boolean. It is initially false. +
          custom element state
          "undefined", "failed", "uncustomized", "precustomized", or "custom".