-
#Idea: A
Response.prototype.safeScript()
type that returns aTrustedScript
if the fetch passes CSP. You could then safelyeval()
the script later. Could do the same withsafeHtml()
that returnsTrustedHtml
as well... -
We would probably want to require that the page
fetch()
aTrustedScriptURL
instead of an untrusted string, but hopefully this gets the point across at least.