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

How can policyValue be 'undefined'? #540

Open
smaug---- opened this issue Aug 2, 2024 · 2 comments
Open

How can policyValue be 'undefined'? #540

smaug---- opened this issue Aug 2, 2024 · 2 comments

Comments

@smaug----
Copy link
Collaborator

smaug---- commented Aug 2, 2024

https://w3c.github.io/trusted-types/dist/spec/#abstract-opdef-process-value-with-a-default-policy step 4
The callbacks are webidl callbacks, so the return value is DOMString? or USVString?, no?

https://w3c.github.io/trusted-types/dist/spec/#get-trusted-type-compliant-string-algorithm seems to then check for undefined too.

@mbrodesser-Igalia @lukewarlow @koto

@lukewarlow
Copy link
Member

Yeah I think you're right the undefined would become null through the IDL conversions.

@petervanderbeken
Copy link

I've commented on this before (https://github.com/w3c/trusted-types/pull/527/files#r1645882026), these algorithms need to start using https://webidl.spec.whatwg.org/#invoke-a-callback-function

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

No branches or pull requests

3 participants