Repository navigation
Firefox 138/139 adds new Sanitizer API behind flag - #26659
Conversation
|
Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs). |
| "spec_url": "https://wicg.github.io/sanitizer-api/#sanitizer-api", | ||
| "support": { | ||
| "chrome": { | ||
| "version_added": "105", |
There was a problem hiding this comment.
We should start from clean - the reason we deleted this is that too much changed in the spec and we decided to rewrite history that this never existed.
There was a problem hiding this comment.
We discussed it at BCD meeting and agreed that keeping the history of Chrome supporting the previous version of the spec for a while is still useful. It might be a completely new PR, but some info from this one should be used.
There was a problem hiding this comment.
Thanks @pepelsbey That's a reversion of their previous position, and seems "nuts".
@Elchi3 This makes no sense - no one should be using the older version and we previously agreed it was dead and gone. Trying to build on top of that will make this a very ugly compat story.
If it had been worth keeping, then we would have done so.
There was a problem hiding this comment.
From @Elchi3
Not sure. The main argument here is that we violated the BCD removal guidelines. If something was exposed (on by default) to real users, then it can only be removed again from BCD if it is unshipped everywhere for more than two years. Not the case with the Sanitizer API which was on by default in Chrome. I used to think it was fine to make an exception and remove the data but it seems that consumers (web-features) aren't happy when we're not sticking to our own rules 🙂 Also, I thought it was only exposed briefly, but 105-119 is not that brief.
To which I have responded:
I'm OK with living with the exception.
That is after all what Chrome and the spec authors wanted. They reused the API names, but the behaviours are quite different.
I'll stick with not adding the history unless you guys insist.
I see your point, but essentially we made the best decision for 99% of developers.
bcb6ccb to
c09bc0d
Compare
|
@Elchi3 I think this is good to review. Removed the web tags, removed the legacy stuff which I hope you won't make me put back in. |
caugner
left a comment
There was a problem hiding this comment.
LGTM overall, but I think it would be useful to have notes for api.Element.setHTML and api.Sanitizer for chrome mentioning that Chrome 105-118 (incl.) supported a differently specified feature under these names.
fa9e765 to
ac5c3bb
Compare
Good idea. Done in ac5c3bb Note, that removes a bunch of unrelated MDN URLS. I didn't do that, so it must be something added by the linter at the end. |
That can happen if your Edit: I have fixed those now. |
|
Given that the MDN pages don't exist yet, I'm holding off on merging until @Elchi3 or @pepelsbey had a final look. |
| "chrome": { | ||
| "version_added": false, | ||
| "notes": "Chrome 105 to Chrome 118 (inclusive) supported this interface name with a significantly different specification." | ||
| }, |
There was a problem hiding this comment.
So, what will happen in the future here? Is it this?
| "chrome": { | |
| "version_added": false, | |
| "notes": "Chrome 105 to Chrome 118 (inclusive) supported this interface name with a significantly different specification." | |
| }, | |
| "chrome": [ | |
| { | |
| "version_added": "200" | |
| }, | |
| { | |
| "version_added": "105", | |
| "version_added": "119", | |
| "notes": "Chrome 105 to Chrome 118 (inclusive) supported this interface name with a significantly different specification." | |
| } | |
| ], |
There was a problem hiding this comment.
@Elchi3 I was expecting:
| "chrome": { | |
| "version_added": false, | |
| "notes": "Chrome 105 to Chrome 118 (inclusive) supported this interface name with a significantly different specification." | |
| }, | |
| "chrome": { | |
| "version_added": "200", | |
| "notes": "Chrome 105 to Chrome 118 (inclusive) supported this interface name with a significantly different specification." | |
| }, |
... and one day perhaps the note disappears.
The alternative is to add this now like:
{
"version_added": "105",
"version_added": "119",
"notes": "This support had a significantly different specification."
}
But only for the things that are supported now - i.e. not try and add in the methods that have been removed because that is what would make this very messy.
There was a problem hiding this comment.
My rationale for adding a note was that some folks may expect to find this historical context in BCD.
Indeed the alternative would be to have a (partial!?) support statement with version_added: 105 and version_removed 119`.
There was a problem hiding this comment.
Really just requires a decision. I'm happy with this.
Elchi3
left a comment
There was a problem hiding this comment.
OK. I would say let's go with how it is now then. We can always introduce ranged versions for Chrome if there is demand for it.
|
Thank you both. As you say, we can adjust as needed. |
|
I think we should also document the new |
@evilpie None of those are supported in FF138/9, which is what this was for. I understand the new features come in FF140, which I expect to look at in a few weeks. I can't do them now, because the preview release is 139. Which is to say "I would like to". I'm going to document them even though they are not supported anywhere yet - because it is too hard to explain the API concepts without them. |
|
Oh sorry, I hadn't really thought about how those aren't part of 139 yet. |
|
No worries. Good you're on top of this. |
Summary
EDIT.
Test results and supporting details
Document.parseHTML(): https://bugzilla.mozilla.org/show_bug.cgi?id=1959725Sanitizer,Element.setHTML()Sanitizer.removeUnsafe()method - https://bugzilla.mozilla.org/show_bug.cgi?id=1952250Not yet implemented "Add a sanitizer option to Element/Shadowroot
setHTMLUnsafe()andDocument.parseHTMLUnsafe()" - see https://bugzilla.mozilla.org/show_bug.cgi?id=1959727