Skip to content

Conversation

@hamishwillee
Copy link
Contributor

@hamishwillee hamishwillee commented May 15, 2025

FF140 adds remaining sanitizer method/options behind flag in https://bugzilla.mozilla.org/show_bug.cgi?id=1959727

Once FF140 becomes nightly, these would change to "preview".

Changes are:

  • `ShadowRoot.setHTML()] - new method
  • options.sanitizer added to param to ShadowRoot.setHTMLUnsafe() and Document.parseHTMLUnsafe()

This follows on from #26659

FYI @evilpie I was "somewhat wrong" in #26659. I can add them, just not as a "preview" release. I didn't think of this properly because I was so focused on FF139.

Related docs work being done in mdn/content#38890

@github-actions github-actions bot added data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API size:l [PR only] 101-1000 LoC changed labels May 15, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 15, 2025

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

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

Once FF140 becomes nightly, these would change to "preview".

Based on https://whattrainisitnow.com/, Firefox 140 currently is Nightly.

Is this planned to ship in 140? Then we can keep it as is, otherwise we should set it to "preview" now.

@evilpie
Copy link
Contributor

evilpie commented May 16, 2025

I think this is still missing the sanitizer option for Element.setHTMLUnsafe.

Is this planned to ship in 140?

No

@hamishwillee
Copy link
Contributor Author

@caugner @evilpie Thanks both

  • Added missing method
  • Changed to preview - my browser just switched to 140.
  • Changed the subfeature in all methods to experimental.

Should be good now.

@evilpie
Copy link
Contributor

evilpie commented May 20, 2025

I hadn't caught this, but considering these methods aren't available by default, shouldn't the compat info have the pref instead of a version?

@caugner
Copy link
Contributor

caugner commented May 20, 2025

I hadn't caught this, but considering these methods aren't available by default, shouldn't the compat info have the pref instead of a version?

Are these behind a pref even in Nightly? (Then yes.)

@caugner
Copy link
Contributor

caugner commented May 23, 2025

@hamishwillee PTAL at the comments above.

If the feature is not available by default in Nightly, then we should set flags.

@hamishwillee
Copy link
Contributor Author

@caugner They are behind a flag that is enabled in nightly.

FYI only, the reason they were previously behind the flag was because when I started this process FF140 was not nightly, and that was the version this went in with.

Co-authored-by: Claas Augner <[email protected]>
@hamishwillee hamishwillee requested a review from caugner May 27, 2025 06:12
@caugner caugner changed the title Remaining sanitizer methods Firefox Nightly adds ShadowRoot.setHTML() and sanitizer parameter May 27, 2025
@caugner caugner merged commit 7f553b3 into mdn:main May 27, 2025
6 checks passed
@mdn-bot mdn-bot mentioned this pull request May 27, 2025
@hamishwillee hamishwillee deleted the remaining_sanitizer_methods branch May 29, 2025 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API size:l [PR only] 101-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants