How to set script-src in a Chrome packaged app? -


i'm trying create chrome packaged app complicated web app. i'm getting error:

refused execute inline event handler because violates following content security policy directive: "default-src 'self' chrome-extension-resource:". note 'script-src' not explicitly set, 'default-src' used fallback.

how explicitly set policy in manifest.json? i've tried things like:

"content_security_policy": "default-src 'inline'; script-src 'inline'" 

but still same error message. syntax wrong, or error red herring?

you can't loosen default csp in packaged app. if you're doing <button id="foo" onclick="dosomething()"> should instead include separate js file in html document.queryselector("#foo").onclick = dosomething; in onload handler. comply csp , make app more resistant xss attacks.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -