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

1) So in case oldAttr == attr, its value isn't updated.

Yes, I think that makes sense? If the attribute hasn't changed does it make sense to put it through Trusted Types default policy?

2) 'append an attribute' calls 'Handle attribute changes', and verifiedValue is set to attr after that. That doesn't seem right. Shouldn't value be set before?

Ah yeah, you're right, step 7 should be moved to step 5.

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

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

Received on Thursday, 3 July 2025 12:18:36 UTC