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

I see. Yes, you're right. The value is actually set, it's just that the event object is not created, but the actual content attribute value is set in DOM spec later. 

This behavior is a bit similar to what we'd want for TT (fill the right slots with the right values if the based on the value type). So we could define the slots for trusted values in the appropriate elements in HTML (set directly from IDL attributes). 

I would argue that we should support `setAttribute(name, TrustedXYZ)` and `setAttribute(name, stringThatWillBeRoutedToDefaultPolicy)`. Without it, we're placing an unneccessary burden on authors to rewrite applications to not only change the values, but the way they are setting attributes. A big value proposition of TT is that this is rarely needed. We could do it via attribute change steps, if only the change steps didn't get the value stringified. The actual content attribute would remain a string, TT integration would just set a slot value. 



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

Received on Friday, 15 November 2019 16:36:03 UTC