trusted-types
trusted-types copied to clipboard
Add WPT that `createPolicy` which violates the `trusted-types` CSP directive fires a violation event for Windows (not Workers)
E.g. createPolicy("X");
with trusted-types 'none'
".
https://w3c.github.io/trusted-types/dist/spec/#should-block-create-policy doesn't set the violation's element
.
Hence https://w3c.github.io/webappsec-csp/#report-violation step 3.2 sets target to the document.
Step 3.3 fires the event.
CC @lukewarlow, @otherdaniel