Skip to content

Make the DocumentFragment to sanitize inert#12561

Open
zcorpan wants to merge 1 commit into
mainfrom
zcorpan/sanitizer-inert-documentfragment
Open

Make the DocumentFragment to sanitize inert#12561
zcorpan wants to merge 1 commit into
mainfrom
zcorpan/sanitizer-inert-documentfragment

Conversation

@zcorpan

@zcorpan zcorpan commented Jun 10, 2026

Copy link
Copy Markdown
Member

Fixes #12560.

(No PR template as this is only an issue in the spec AFAICT.)


/dynamic-markup-insertion.html ( diff )

@annevk annevk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@noamr I think your change obsoletes the need for this?

noamr
noamr previously approved these changes Jul 3, 2026
Comment thread source
<li><p>Let <var>fragment</var> be a new <code>DocumentFragment</code> whose <span>node
document</span> is <var>contextElement</var>'s <span>node document</span>.</p></li>
document</span> is a new <code>Document</code> (whose <span
data-x="concept-document-bc">browsing context</span> is null).</p></li>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay if we do need this I'm wondering if this needs to at least specify the type of document.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I wonder if we can use the template document for this rather than create a new one?

@noamr noamr Jul 3, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also maybe we should wait and do this as part of the streaming sanitizer? That issue is going to go away because removed elements are not going to be added to the fragment in the first place

@noamr

noamr commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

@noamr I think your change obsoletes the need for this?

Actually it is, specifically streaming sanitizer. Maybe we should hold off on this.

@noamr noamr self-requested a review July 3, 2026 17:17
@noamr noamr dismissed their stale review July 3, 2026 17:18

Preferring to do this as part of streaming sanitizer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Nodes are made non-inert before sanitizing

4 participants