Essentially, we'd like:
eval(TrustedScript), new Function(TrustedScript), and new Function(TrustedScript, TrustedScript) to work
- Their string equivalents to go through the default policy
createScript function (a.k.a. if TT are enforced, to generate violation and not execute code by default)
- The default policy to be able to change the values to be executed.
The language primitives tracked in Dynamic Code Branch Checks TC39 proposal.
There's additional CSP integration required, tracked #143. Since it relaxes the CSP conditions, we might require a new keyword. We propose script-src 'trusted-script'