Re: [whatwg/dom] Trusted types attributes (PR #1268)

@lukewarlow commented on this pull request.



> @@ -6484,8 +6514,19 @@ string <var>namespace</var> (default null):</p>
 
  <li><p>If <var>oldAttr</var> is <var>attr</var>, return <var>attr</var>.
 
- <li><p>If <var>oldAttr</var> is non-null, then <a lt="replace an attribute">replace</a>
- <var>oldAttr</var> with <var>attr</var>.
+ <li>
+  <p>If <var>oldAttr</var> is non-null, then:</p>
+
+  <ul>
+   <li><p><a>Validate and set attribute value</a> <var>attr</var>'s <a for="Attr">value</a> for
+   <var>attr</var> with <var>element</var>.
+
+   <li><p>If <var>element</var> <a lt="has an attribute">has</a> an <a>attribute</a>

I've read through this spec path and I believe that, if the default policy removes the existing attribute node, then this will call replace an attribute, which in turn calls replace a list item, which results in a no-op because the old value no longer exists to be replaced.

So I think in this situation you're probably right the spec doesn't need to do anything, will make that change.

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

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

Received on Monday, 22 April 2024 13:02:07 UTC