Skip to content

Conversation

@otherdaniel
Copy link
Contributor

@otherdaniel otherdaniel commented Oct 16, 2025

Document.parseHTMLUnsafe is a static method and doesn't have a this. This fixes Document.parseHTMLUnsafe's algorithm to use the current global object, rather than this' relevant global object.

Fix: #11778

This is an editorial fix, so I'm not entirely sure the checklist below is meaningful. Still:

(See WHATWG Working Mode: Changes for more details.)


/dynamic-markup-insertion.html ( diff )

otherdaniel added a commit to WICG/sanitizer-api that referenced this pull request Oct 17, 2025
Document.parseHTMLUnsafe is a static method and doesn't have a this. This fixes Document.parseHTMLUnsafe's algorithm to use the current global object, rather than this' relevant global object.

Analogous to: whatwg/html#11799
Based on: whatwg/html#11778
@lukewarlow
Copy link
Member

@annevk is this okay to be merged?

@zcorpan
Copy link
Member

zcorpan commented Oct 28, 2025

Is there a multi-globals test (examples) to check that "current global object" is the one that is used?

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

Yeah this looks okay to me. This matches what we do for static methods in Fetch.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Document.parseHTMLUnsafe() steps involved using this for the TrustedTypes integration but the method is static in the IDL

4 participants