Repository navigation
Conversation
added 10 commits
October 23, 2026 07:03
…registry checks, clearer getRegistry
…ception points, attribute callback order, one tree walk
…try, adoption rollback, shared parsing wrapper
…associated stand-ins, waiting elements and adoption, record parentless nodes before moves
…paired fragment copies, comments Internal code calls getRegistry rather than the public getter. A failed upgrade removes the element's definition, as natively, so isFailed checks go and a failed element can attach a shadow root. A fragment or document copy that can't be paired keeps its elements' positional registries instead of null. Removes the adoptedCallback registry change (patched APIs already do it), an unused interface augmentation and other small redundancies. Fixes stale comments.
…ows, adoptRegistries uses forEachInTree, clearer names and comments
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.
Follow-up to #668 and #669. Base:
scoped-registry-cross-realm(#669).The result of several review passes over #668, with these goals: correct, robust, readable, simple to maintain, and small. The changes fall into two kinds.
Simpler, easier-to-maintain code
getRegistry, split into small helpers for the three ways a node gets its registry;withAdoptionfor every adopting insertion;forEachInTree);replaceChildrenByParsing).Correct, robust behaviour
Where the polyfill differed from native, it now follows the spec:
new X()), cloned, adopted or moved, including when an insertion throws partway.attachInternalsonly for custom elements; argument checking as in WebIDL.Document.append,textContentandsetHTML.Soundness
force.