Feature: Add the possibility to set attributes on the style element #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "nonce"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I added the possibility to set attributes on the
<style>element. This is useful especially when you want to set Content-Security-Policy"default-src 'none'; style-src 'self' 'nonce-randomNonce'", since anonceattribute needs to be added on the<style>element before it's insertion in the DOM.It seems odd and potentially dangerous to have an option that only takes effect when there's no support for adopted style sheets. It doesn't look like
new CSSStyleSheetsupports this kind of attributes.Yes, I agree with you. I'll close the PR until I find a proper solution.
Pull request closed