w3c / webappsec-csp

WebAppSec Content Security Policy
https://w3c.github.io/webappsec-csp/
Other
210 stars 78 forks source link

"Is element nonceable" not applied to non-<script> elements in Chrome? #643

Open evilpie opened 9 months ago

evilpie commented 9 months ago

It seems like Chrome doesn't actually apply Is element nonceable? to non-script elements, judging by this code search and some manual testing. I can't tests Webkit, but I suspect they do this correctly (source).

When I added is-element-nonceable to Firefox I followed the more limited Chrome behavior, but I would be interested in seeing this interoperable.

I assume we also want to do this for <link rel=preload>? This also comes back to #635, where this isn't properly defined for non-inline resources!

Edit: And we should be adding more WPTs that cover all the applicable elements.