- From: Anne van Kesteren <notifications@github.com>
- Date: Thu, 16 Jul 2026 23:51:49 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/1494@github.com>
Create an element sets the active custom element constructor map entry for the constructor it is about to construct, then removed it once construction finished. A re-entrant construction of the same constructor for a different registry therefore clobbered the outer entry, and its removal left the outer construction to resolve against the wrong registry.
Save the previous entry before setting it and restore it afterwards, so the outer registry survives a re-entrant construction. This mirrors the same change to the HTML element constructor and upgrade an element.
See https://github.com/whatwg/html/pull/12696.
<!--
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.
-->
- [ ] At least two implementers are interested (and none opposed):
* …
* …
- [ ] [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/61364
- [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
* Chromium: …
* Gecko: …
* WebKit: …
* Deno (only for aborting and events): …
* Node.js (only for aborting and events): …
- [ ] [MDN issue](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) is filed: …
- [ ] 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/1494
-- Commit Summary --
* Restore active custom element constructor map entries after construction
-- File Changes --
M dom.bs (14)
-- Patch Links --
https://github.com/whatwg/dom/pull/1494.patch
https://github.com/whatwg/dom/pull/1494.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1494
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/dom/pull/1494@github.com>
Received on Friday, 17 July 2026 06:51:53 UTC