Skip to content
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

Set slot values when called directly by the parser #252

Closed
koto opened this issue Dec 13, 2019 · 2 comments
Closed

Set slot values when called directly by the parser #252

koto opened this issue Dec 13, 2019 · 2 comments
Labels
Milestone

Comments

@koto
Copy link
Member

koto commented Dec 13, 2019

Scripts created by the parser don't have their slot values filled, which formally would cause the default policy invocation in prepare script url and text - and might cause the rejection of the values at parsing time since create an element for the token will append content attributes, to which we're adding validate steps.

When writing the attribute validate steps for scripts, we should accept the value and bail out if the algorithm was called from within HTML parser. We should also set the slot value in attribute change steps for script.src (and, later, for iframe.srcdoc). In fact, it's easier to move the slot setting for scripts to attribute change steps (right now it's defined at IDL level in https://w3c.github.io/webappsec-trusted-types/dist/spec/#setting-slot-values).

I'm not sure yet what to do with script bodies.

@koto koto added the spec label Mar 2, 2020
@koto koto added this to the v1 milestone Mar 6, 2020
@koto
Copy link
Member Author

koto commented Mar 9, 2020

This is the Chrome implementation (only script text is affected): https://chromium-review.googlesource.com/c/chromium/src/+/2041622

@koto
Copy link
Member Author

koto commented Jul 12, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants