We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
See https://w3c.github.io/trusted-types/dist/spec/#trusted-type-policy-options
dictionary TrustedTypePolicyOptions { CreateHTMLCallback? createHTML; CreateScriptCallback? createScript; CreateScriptURLCallback? createScriptURL; }; callback CreateHTMLCallback = DOMString (DOMString input, any... args); callback CreateScriptCallback = DOMString (DOMString input, any... args); callback CreateScriptURLCallback = USVString (DOMString input, any... args);
Whereas in Chrome it's:
dictionary TrustedTypePolicyOptions { CreateHTMLCallback createHTML; CreateScriptCallback createScript; CreateURLCallback createScriptURL; }; callback CreateHTMLCallback = DOMString? (DOMString input, any... args); callback CreateScriptCallback = DOMString? (DOMString input, any... args); callback CreateURLCallback = USVString? (DOMString input, any... args);
Aside from Chrome naming it URLCallback rather than ScriptURLCallback the nullability of the return type and options params are different.
Is the spec correct or is chrome correct in terms of what's expected?
The text was updated successfully, but these errors were encountered:
After #389 it's just the nullability inside the options dictionary that's different
Sorry, something went wrong.
Good catch. I merged #389, it should also be
dictionary TrustedTypePolicyOptions { CreateHTMLCallback createHTML; CreateScriptCallback createScript; CreateURLCallback createScriptURL; };
in the spec, i.e. trustedTypes.createPolicy('a', {createHTML: null}) should throw.
trustedTypes.createPolicy('a', {createHTML: null})
Fix w3c#388.
52ddbc9
9b81281
Fix #388. (#395)
87134ca
SHA: 9b81281 Reason: push, by koto Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
No branches or pull requests
See https://w3c.github.io/trusted-types/dist/spec/#trusted-type-policy-options
Whereas in Chrome it's:
Aside from Chrome naming it URLCallback rather than ScriptURLCallback the nullability of the return type and options params are different.
Is the spec correct or is chrome correct in terms of what's expected?
The text was updated successfully, but these errors were encountered: