Commit Graph

3 Commits

Author SHA1 Message Date
Krzysztof Kotowicz 3561285ea8 Skip using Trusted Types checks if trustedTypesPolicyName is empty. 2021-05-07 10:30:57 +02:00
Bjarki b6e112dabe Only expose createScriptURL function from Trusted Types policy
Since createScriptURL is the only function that is used on webpack's
Trusted Types policy, replace the getTrustedTypesPolicy global with a
simpler createScriptURL global.

In terms of compiled code, this replaces the non-minifiable
tt().createScriptURL(url) with tu(url), which is more compact in terms
of code size.
2021-05-04 16:26:22 +02:00
Bjarki c71184958d Move Trusted Types policy into TrustedTypesRuntimeModule
Also make the policy available at runtime through
RuntimeGlobals.getTrustedTypesPolicy(), and update runtime dependencies
accordingly.
2021-05-04 16:12:41 +02:00