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

@lukewarlow commented on this pull request.



> +   <li><p>If <var>attribute</var>'s <a for=Attr>element</a> is null, then set <var>attribute</var>'s
+   <a for=Attr>value</a> to <var>verifiedValue</var>, and return.
+
+   <li><p>If <var>attribute</var>'s <a for=Attr>element</a> is not <var>originalElement</var>, then
+   return.

Regarding does this get called early enough.

"set an existing attribute value" is the first step invoked by Attr's value setter steps, Attr's textContent setter steps, and Attr's nodeValue setter steps.

NamedNodeMap's setNamedItem and setNamedItemNS, along with Element's setAttributeNode and setAttributeNodeNS both call "set an attribute" as their first steps.

Then setAttribute and setAttributeNs both have their own dedicated steps.





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

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

Received on Tuesday, 30 September 2025 20:59:37 UTC