-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nonce attribute: no longer tentative #21853
Conversation
I'll add at least one test to ensure this nonce attribute also works generically and then I think I've done more than my share on this feature... |
Filed https://bugs.chromium.org/p/chromium/issues/detail?id=1053496 on the Chrome failures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These LGTM. Thank you for putting them together, and for filing the bug against Chromium. I really appreciate your effort.
@mikewest I'm going to assume these final changes are okay per your comments elsewhere, but happy to take more feedback. (Including after landing these.) |
Also clarify some prose around the nonce content attribute, including that it does in fact update the slot upon removal. Tests: web-platform-tests/wpt#21853. Fixes #5288.
FYI: I updated Chrome to match with the new expectations. |
Thanks @ArthurSonzogni! |
According to CSP, nonce are handled the same way for both HTMLElement and SVGElement. Both are setting the nonce when the Element is inserted, but only the HTMLElement was supporting "modifying" a nonce. It looks like a bug in Chrome found by annevk@: web-platform-tests/wpt#21853 This patch fixes the issue. It was meant to fix the WPT test: - content-security-policy/nonce-hiding/nonces.html But it turns out it is also fixing two more tests - content-security-policy/nonce-hiding/svgscript-nonces-hidden.html - content-security-policy/nonce-hiding/svgscript-nonces-hidden-meta-sub.html Bug: 1053496 Change-Id: I872cae74817bff2f5f910dcd7864fc97426c49cf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2075340 Reviewed-by: Mike West <mkwst@chromium.org> Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org> Cr-Commit-Position: refs/heads/master@{#746774}
For whatwg/html#5300.
Supersedes #5423.