Streaming sanitizer (depends on 12624)#12645
Draft
noamr wants to merge 28 commits into
Draft
Conversation
Instead of inserting elements to a fake root element of a connected inert document and then appending them to a `DocumentFragment`, we let the parser insert the root's children straight into that `DocumentFragment`. This is done by having an "adjusted insertion target" that the parser uses to route insertions desined to the root of the stack directly into the fragment. The observable behavior change is in subtle places that check for connectedness when insertion, like radio buttons. This is also creates an enabler that can be used later on for HTML streaming, as the "adjusted insertion target" can be the context element instead of the intermediate fragment. Note that we still need some notion of the intermediate inert document, to avoid creation time side effects like image loading and custom element constructors to occur before sanitization. (This resembles blink implementation, more than the current wording) Closes #11023
This reverts commit 3b8d929.
f5cdc0b to
00a9f9d
Compare
00a9f9d to
2e43740
Compare
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.
(See WHATWG Working Mode: Changes for more details.)
/document-lifecycle.html ( diff )
/dynamic-markup-insertion.html ( diff )
/parsing.html ( diff )
/xhtml.html ( diff )