You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an extension of the proposal in #1336 to cover the new HTML setters, and the integration with trusted types.
The Sanitizer API is providing a new method to modify HTML without causing XSS, which is one of the most prevalent security vulnerabilities in the world. In order for developers to be able to depend on these features it's necessary for them to be reliable cross-browser.
Note that, although this feature is an unmerged PR at the time of writing, we are confident it will be merged in plenty of time for Interop.
Reacted by Oliver Williams, phantomxx29474, Barry Pollard, Frederik Braun, Valtteri Laitinen, Craig Francis, Gustav Hansen, Luke Warlow, Santi, Noam Rosenthal and 5 more
Reacted by Oliver Williams, phantomxx29474, Frederik Braun, Santi and Anna Weine
This comment was automatically generated based on the information you provided. Please don't edit it.
Below is additional information about the web feature (from the web-features project) which is referenced in your proposal.
If this doesn't accurately correspond to your proposal, please update your initial comment to include web-features: <feature-id>.
To find feature IDs, use the web-features explorer.
Feature HTML setter methods
ID: html-setters
Name: HTML setter methods
Description: The setHTML(), replaceWithHTML(), beforeHTML(), prependHTML(), appendHTML() and afterHTML() DOM methods, and unsafe equivalents, insert HTML into an existing tree.
Dupe of #1336? You can't really use one without the other.
Well you can implement Sanitizer API with just setHTML (Firefox does this, as did Chrome originally, but we're about to launch these), without these new additions. So while I agree #1336 is needed first, I don't think implementing #1336 implies this will be implemented as well.
The original post does start with "This is an extension of the proposal in #1336..."
So currently we're tracking these as two separate feature ids: sanitizer and html-setters (three if you include html-streaming-setters). So I think it's not unreasonable to track as two (very related!) interop proposals. While I'd love to see both implemented, I don't know if combining them them would risk #1336 getting rejected due to the scope being too big/these being too new, if these are insisted upon being part of that?
Activity
github-actions commentedon Sep 18, 2026
This comment was automatically generated based on the information you provided. Please don't edit it.
Below is additional information about the web feature (from the web-features project) which is referenced in your proposal.
If this doesn't accurately correspond to your proposal, please update your initial comment to include
web-features: <feature-id>.To find feature IDs, use the web-features explorer.
Feature HTML setter methods
setHTML(),replaceWithHTML(),beforeHTML(),prependHTML(),appendHTML()andafterHTML()DOM methods, and unsafe equivalents, insert HTML into an existing tree.[-]Sanitizer API: HTML (streaming) setter methods[/-][+]Sanitizer API: HTML setter methods[/+]jgraham commentedon Sep 21, 2026
Note: scope updated to exclude the streaming setter APIs.
zcorpan commentedon Sep 23, 2026
Related: #1465
engedy commentedon Sep 23, 2026
CC @otherdaniel.
jakearchibald commentedon Sep 29, 2026
Dupe of #1336? You can't really use one without the other.
tunetheweb commentedon Sep 29, 2026
Well you can implement Sanitizer API with just
setHTML(Firefox does this, as did Chrome originally, but we're about to launch these), without these new additions. So while I agree #1336 is needed first, I don't think implementing #1336 implies this will be implemented as well.The original post does start with "This is an extension of the proposal in #1336..."
So currently we're tracking these as two separate feature ids: sanitizer and html-setters (three if you include html-streaming-setters). So I think it's not unreasonable to track as two (very related!) interop proposals. While I'd love to see both implemented, I don't know if combining them them would risk #1336 getting rejected due to the scope being too big/these being too new, if these are insisted upon being part of that?
jakearchibald commentedon Sep 29, 2026
I'm not against them staying separate as long as it's absolutely clear what it would mean for Interop to take on one but not the other.
jakearchibald commentedon Oct 5, 2026
@jgraham could you edit the OP to remove references to streaming stuff?
Then it's:
parseHTML, andsetHTML.parseHTMLandsetHTMLas they're covered in the other issue.zcorpan commentedon Nov 6, 2026
I added whatwg/html#12583 to OP for the trusted types integration.
tunetheweb commentedon Nov 6, 2026
The specifications have been merged so this can be updated to replace with:
The test have been moved out of tentative state and can be seen here: