JakeChampion/polyfill-library

[Feature] Pass a nonce via query string

Opened this issue · 0 comments

Some polyfills might need to insert additional code/styles into the page (for example, the inert polyfill). Using a strict CSP (for example style-src 'self' https: 'nonce-ABC123') would mean that that specific polyfill will fail.

What I'm proposing is to add a nonce via query string and pass down that nonce to all polyfills, so they can consume it (if its present) and act accordingly (for example, adding the nonce to inline styles/js).