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

@annevk commented on this pull request.

I would love to have a more detailed description of what we are trying to accomplish here. I don't think the resulting algorithms are very clear. Have you looked at whether it's possible to abstract certain bits?

> @@ -6946,6 +6948,14 @@ steps:
  <a for=Attr>value</a>.
 </ol>
 
+<p>To <dfn>verify attribute value</dfn> given a {{TrustedType}} or string <var>value</var>, an

```suggestion
<p>To <dfn>verify an attribute value</dfn> given a {{TrustedType}} or string <var>value</var>, an
```
Although why do we even have this algorithm as it directly calls into the Trusted Types algorithm.

> + <li><p>If <var>attribute</var> is null, then set <var>attribute</var> to an <a>attribute</a>
+ whose <a for=Attr>local name</a> is <var>qualifiedName</var>, <a for=Attr>value</a> is
+ <var>value</var>, and <a for=Node>node document</a> is <a>this</a>'s <a for=Node>node document</a>.

Is the idea here to create a dummy attribute that you don't append in order to calculate the verified value?

Why is that done this way? This is quite confusing to read through.

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

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

Received on Monday, 19 May 2025 08:15:26 UTC