Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
sorvell
force-pushed
the
scoped-registry-redesign
branch
from
October 1, 2026 13:34
7b18f61 to
2162b48
Compare
added 4 commits
October 1, 2026 06:42
…orced-polyfill Chromium run - tests.yml: Node 24.5, actions v4, install Playwright browsers, drop the Saucelabs job - scoped-custom-element-registry: test:forced runs the tests in Chromium with the polyfill forced (FORCE_POLYFILL), and npm test depends on it - test/wtr.firefox.config.js: run the tests locally in a Firefox-engine browser without native support
A rewrite. Start with the "How it works" overview at the top of src/scoped-custom-element-registry.ts, then read the file rather than the line diff.
behavior.test.js and parsing.test.html(.js) are new; tests of polyfill-only behavior, and of spec behavior Chromium gets wrong, use itWithPolyfill so the suite also runs against native implementations.
sorvell
force-pushed
the
scoped-registry-redesign
branch
from
October 1, 2026 13:43
2162b48 to
698b7c2
Compare
added 2 commits
October 1, 2026 06:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #604. Updates the polyfill to the current registry model, including null registries, initialize(), declarative shadow roots, and registry preservation across moves, cloning, and adoption. Supports both attribute spellings involved in whatwg/html#12000.
The native stand-in approach remains. Construction now queues elements until their registries are recorded, then invokes their user constructors before the patched DOM call returns. Main-parser elements wait until the document becomes interactive. Registry bookkeeping is independent of native scoped-registry support.
For review:
The old ShadowRoot.createElement, createElementNS, and importNode APIs are replaced by document APIs with an explicit customElementRegistry option.
npm test builds and runs Chromium, Firefox, WebKit, and forced-polyfill Chromium. Tests marked
itWithPolyfillcover polyfill-specific behavior or documented native discrepancies.