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

@smaug---- commented on this pull request.



> - <li>If <var>attribute</var> is null, create an <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>, <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>.

This should probably clarify that validation may throw an exception. What should happen in that case?

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

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

Received on Friday, 9 February 2024 10:47:20 UTC