-
Notifications
You must be signed in to change notification settings - Fork 74
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
What shoud script element's textContent's sink string be? #572
Comments
I think the spec is quite clear, it should be "HTMLScriptElement textContent".
This test checks the correct sink names here:
The switch statement you mention is a noop: The same mistake seems to happen for the switch statement added in web-platform-tests/wpt#46089 I'll try and fix that. |
This is fixed by web-platform-tests/wpt#49909 (I cannot close the issue because my github account does not have proper permission for this repo) |
To me it looks like the test that was updated by web-platform-tests/wpt#49909 still uses |
That test should be text because that's the sink that's tested in it. |
Yeah basically when setting HTMLScriptElement's textContent, the sink string should be textContent. And when setting HTMLScriptElement's text the sink string should be text. The confusion was with default-policy-callback-arguments.html, which was setting HTMLScriptElement's textContent but had two contradictory assertions for the sink string (checking it's both textContent and text). As explained above, the second assertion was actually not reachable (and wrong) so I removed it. I took the opportunity to fix unreachable assertions in other tests. |
Sorry, makes sense! |
Great catch btw sorry I didn't spot that mistake when reviewing/writing the relevant tests. |
https://w3c.github.io/trusted-types/dist/spec/#dom-htmlscriptelement-textcontent states "HTMLScriptElement textContent".
A WPT requires "HTMLScriptElement text":
https://searchfox.org/mozilla-central/rev/1f2c929f93eabe6d753096e47641ebba68b16601/testing/web-platform/tests/trusted-types/default-policy-callback-arguments.html#27-28,45-46
The text was updated successfully, but these errors were encountered: