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

"stringifying" in "Process value with a default policy" needs to be defined #541

Open
mbrodesser-Igalia opened this issue Aug 15, 2024 · 3 comments
Labels

Comments

@mbrodesser-Igalia
Copy link
Collaborator

mbrodesser-Igalia commented Aug 15, 2024

In https://w3c.github.io/trusted-types/dist/spec/#abstract-opdef-process-value-with-a-default-policy step 2.

@mbrodesser-Igalia mbrodesser-Igalia changed the title "stringifying" in "Process value with a default policy" needs to be defined "stringifying" in "Process value with a default policy" needs to be defined and surprising behavior Aug 15, 2024
@mbrodesser-Igalia mbrodesser-Igalia changed the title "stringifying" in "Process value with a default policy" needs to be defined and surprising behavior "stringifying" in "Process value with a default policy" needs to be defined Aug 21, 2024
@mbrodesser-Igalia
Copy link
Collaborator Author

All callers of "Process value with a default policy" could pass it a string, so no stringification would be needed.

@koto
Copy link
Member

koto commented Oct 31, 2024

Does that not require defining the stringification in https://w3c.github.io/trusted-types/dist/spec/#process-value-with-a-default-policy-algorithm anyway? This is the only callsite that does not already pass a string.

@koto
Copy link
Member

koto commented Oct 31, 2024

Re: defining stringification for TrustedType objects, the spec uses the WebIDL stringifiers - they are not linked to WebIDL definitions, but that syntax seems to be recommended by Bikeshed.

Is there a more idiomatic way to define what should happen when a TrustedType needs converting to a string (by extracting a value from its data slot?)

cc @smaug----

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