Skip to content

setHTML and config option fixes - #15498

Merged
sideshowbarker merged 3 commits into
mdn:mainfrom
hamishwillee:setHTMLupdate
Apr 29, 2022
Merged

sideshowbarker merged 3 commits into
mdn:mainfrom
hamishwillee:setHTMLupdate

Conversation

@hamishwillee

@hamishwillee hamishwillee commented Apr 29, 2022 •

Copy link
Copy Markdown
Collaborator

Fixes #15414

Element.setHTML() takes an options object that contains a reference to a sanitizer, rather than taking a sanitizer directly according to the spec. This updates to match the spec.

NOTE in practice a sanitizer object can be passed directly, and that appears in some spec examples. I will ask for correction/clarification in the spec repo.

In addition, the spec now states that the config options are supported (when I updated the docs in FF84 this was still marked as "still being worked out". What I have done is removed that comment and made sure the config options are correct.
BUT I have not gone through and updated examples to set the configuration. I'll create an issue for that.

EDITED:

@hamishwillee
hamishwillee requested review from a team and sideshowbarker and removed request for a team April 29, 2022 01:55
@github-actions github-actions Bot added the Content:WebAPI Web API docs label Apr 29, 2022
@github-actions

github-actions Bot commented Apr 29, 2022 •

Copy link
Copy Markdown
Contributor

@sideshowbarker
sideshowbarker merged commit 8283e10 into mdn:main Apr 29, 2022
@hamishwillee
hamishwillee deleted the setHTMLupdate branch April 29, 2022 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setHTML accepts sanitizer options, not a sanitizer object

2 participants