Re: [whatwg/dom] Trusted Types integration (#789)

> Throwing is weird (but probably okay for non-strings).

It would most likely throw for strings (expected a type, got a string, default policy doesn't exist or rejects) .

+1 for more opinions on the thread. Intitially was thinking roughly that where you're providing the value as a string, than it would make sense to accept a type too (so `Attr.value` setter as well, but not moving Attrs nodes around via `setAttributeNode`). But `setAttribute` is simply quite common, whereas `Attr.value` is not, so that would be fine. It even makes sense, as `setAttribute` deals with strings, but Attr is directly trying to mutate the existing node. 


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/789#issuecomment-555052218

Received on Monday, 18 November 2019 14:59:52 UTC