-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
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
Add helpers to make it easier to use trusted types #114
Comments
Thanks for filing the issue - I like the alternative you did in https://github.com/flutter/packages/pull/5581/files#diff-fef182cc76f54d7074aee070ced4ddd44ad9233ebf438472221dc834f5f342d9 where you added an extra setter with the right type. The workaround using |
Yes, the workaround with |
TrustedScriptURL
to HTMLScriptElement.src
?
I'm generalizing this issue a bit more to address some other use cases I'm seeing like checking whether |
I wonder if we should be able to flag certain top-level..."things" as optional so the generator can understand them... |
TrustedTypes is one of the most egregious examples, though: I'm not aware of any other non-prefixed chrome-only "top level" APIs like this! |
I think
HTMLScriptElement
needs a src setter that accepts aTrustedScriptURL
.After conditionally creating a trustedUrl like this:
I'm finding myself doing this:
Docs:
(Another way would be to pass
trustedUrl.toString()
, but that kind of defeats the purpose of TrustedScriptURLs, and would still flag me asunsafe_html
I think :/)The text was updated successfully, but these errors were encountered: