[whatwg/dom] Include cloning keep custom element registry null while cloning shadow root (PR #1445)

<!--
Thank you for contributing to the DOM Standard! Please describe the change you are making and complete the checklist below if your change is not editorial.

When you submit this PR, and each time you edit this comment (including checking a checkbox through the UI!), PR Preview will run and update it. As such make any edits in one go and only after PR Preview has run.

If you think your PR is ready to land, please double-check that the build is passing and the checklist is complete before pinging.
-->

Make sure cloning a shadow root also clone the shadow root variable `keep custom element registry null`. This behavior is already being tested in `wpt/custom-elements/registries/element-mutation.html`. The test will be moved in https://github.com/web-platform-tests/wpt/pull/56423/ but the coverage should remain to be the same.

- [v] At least two implementers are interested (and none opposed):
   * Chromium
   * WebKit
- [v] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at:
   * https://github.com/web-platform-tests/wpt/pull/56423/
- [v] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
   * Chromium: https://issues.chromium.org/issues/399124619
   * Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=1874414
   * WebKit: https://bugs.webkit.org/show_bug.cgi?id=302970

- [v] [MDN issue](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) is filed: N/A
- [v] The top of this comment includes a [clear commit message](https://github.com/whatwg/meta/blob/main/COMMITTING.md) to use. <!-- If you created this PR from a single commit, Github copied its message. Otherwise, you need to add a commit message yourself. -->

(See [WHATWG Working Mode: Changes](https://whatwg.org/working-mode#changes) for more details.)

You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/dom/pull/1445

-- Commit Summary --

  * Include cloning keep custom element registry null while cloning

-- File Changes --

    M dom.bs (4)

-- Patch Links --

https://github.com/whatwg/dom/pull/1445.patch
https://github.com/whatwg/dom/pull/1445.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1445
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/pull/1445@github.com>

Received on Wednesday, 14 January 2026 19:35:26 UTC