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

@lukewarlow commented on this pull request.



> - <a for=Attr>local name</a> is <var>localName</var>, <a for=Attr>value</a> is <var>value</var>, and
- <a for=Node>node document</a> is <var>element</var>'s <a for=Node>node document</a>, then
- <a lt="append an attribute">append</a> this <a>attribute</a> to <var>element</var>, and then
- return.
+ <li>
+  <p>If <var>attribute</var> is null, then:
+  <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>.

Addressed in https://github.com/whatwg/dom/pull/1268 by rechecking the attribute state and throwing an exception if the default policy has done something funky.

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

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

Received on Thursday, 11 April 2024 12:15:25 UTC