Re: [whatwg/dom] Draft integration with Trusted Types, take 2. (PR #1247)

@lukewarlow commented on this pull request.



> + <ol>
+  <li><p>Set <var>attribute</var> to a new <a>attribute</a> whose <a for=Attr>namespace</a> is
+  <var>namespace</var>, <a for=Attr>namespace prefix</a> is <var>prefix</var>,
+  <a for=Attr>local name</a> is <var>localName</var> and <a for=Node>node document</a> is
+  <var>element</var>'s <a for=Node>node document</a>.
+
+  <li><p><a>Validate and set attribute value</a> <var>value</var> for <var>attribute</var> with
+  <var>element</var>.
+
+  <li><p><a lt="append an attribute">Append</a> <var>attribute</var> to <var>element</var>.
+
+  <li><p>Return.
+ </ol>

If we edit append an attribute we might end up with duplicated calls to validate.

For example in the screenshot below you'll see that we need to validate before step 5, but then step 6 which appends would also call validate?

<img width="802" alt="Screenshot 2024-04-10 at 16 12 14" src="https://github.com/whatwg/dom/assets/32498324/61a0d6c6-e7e3-4a20-acfa-b816ed1d4dd1">


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

Message ID: <whatwg/dom/pull/1247/review/1992005226@github.com>

Received on Wednesday, 10 April 2024 15:15:32 UTC