Re: [whatwg/dom] Integrate Trusted Types enforcement into attribute handling (PR #1268)

@lukewarlow commented on this pull request.



> @@ -7013,6 +7020,8 @@ string <var>namespace</var> (default null):</p>
 
  <li><p>Otherwise, <a lt="append an attribute">append</a> <var>attr</var> to <var>element</var>.
 
+ <li><p>Set <var>attr</var>'s <a for=Attr>value</a> to <var>verifiedValue</var>.

So I double checked and for point 1 there's actually an interop bug here, WebKit (and Gecko) doesn't throw a TT error. Chromium currently does, so we can choose whichever behaviour we think is best here.

cc @annevk  and @otherdaniel for your opinions

TLDR should doing

`element.setAttributeNode(element.attributes[1])` - throw a TT error when TT is enforced (and where element.attributes[1] is something like an onclick attribute?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1268#discussion_r2182667519
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/pull/1268/review/2982987900@github.com>

Received on Thursday, 3 July 2025 12:32:46 UTC