Skip to content

Add Element.setHTML() to addedTypes#2467

Open
victorhuangwq wants to merge 1 commit intomicrosoft:mainfrom
victorhuangwq:add-element-sethtml
Open

Add Element.setHTML() to addedTypes#2467
victorhuangwq wants to merge 1 commit intomicrosoft:mainfrom
victorhuangwq:add-element-sethtml

Conversation

@victorhuangwq
Copy link
Copy Markdown

The setHTML() method is defined in the Sanitizer API spec (https://wicg.github.io/sanitizer-api/) but is currently missing from @webref/idl, as setHTML has not migrated over to the WHATWG spec yet.

However, there's already 2 engine support, Chrome 146+ (Blink) and Firefox 148+ (Gecko), meeting the 2-engine requirement. https://developer.mozilla.org/en-US/docs/Web/API/Element/setHTML

The setHTML() method is defined in the Sanitizer API spec (https://wicg.github.io/sanitizer-api/)
but is currently missing from @webref/idl.

Browser support: Chrome 146+ (Blink) and Firefox 148+ (Gecko), meeting the
2-engine requirement for inclusion.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

Thanks for the PR!

This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged.

Copy link
Copy Markdown
Contributor

@Bashamega Bashamega left a comment

Choose a reason for hiding this comment

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

Please migrate it to KDL format. It is the new standard

@saschanaz
Copy link
Copy Markdown
Collaborator

but is currently missing from @webref/idl,

This is a spec issue. I filed WICG/sanitizer-api#391. We should not add things manually.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants