trusted-types icon indicating copy to clipboard operation
trusted-types copied to clipboard

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

Open ghost opened this issue 1 year ago • 3 comments

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

ghost avatar Aug 15 '24 09:08 ghost

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

ghost avatar Aug 21 '24 13:08 ghost

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 avatar Oct 31 '24 10:10 koto

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----

koto avatar Oct 31 '24 11:10 koto