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

@annevk commented on this pull request.

This change is either incomplete or makes many cosmetic changes that would be best proposed separately as they confuse me quite a bit.

> +<p>The <dfn method for=Element><code>setAttributeNode(<var>attr</var>)</code></dfn> methods steps are to
 return the result of <a lt="set an attribute">setting an attribute</a> given <var>attr</var> and
 <a>this</a>.
 
+<p>The <dfn method for=Element><code>setAttributeNodeNS(<var>attr</var>)</code></dfn> methods steps are to
+return the result of <a lt="set an attribute">setting an attribute</a> given <var>attr</var>,
+<a>this</a>.

Why not keep this as before?

> +<p>To <dfn id=concept-element-attributes-validate-and-set-value>validate and set attribute value</dfn>
+{{TrustedType}} or a string <var>value</var> for an <a>attribute</a> <var>attribute</var>, with
+<a for=/>element</a> <var>element</var>:

given a TrustedType or string*

Also, this should maybe not be called "validate" given the discussion elsewhere?

> +<p>The <dfn method for=NamedNodeMap><code>setNamedItem(<var>attr</var>)</code></dfn> method steps are
+to return the result of <a lt="set an attribute">setting an attribute</a> given <var>attr</var>,
+<a for=NamedNodeMap>element</a>.
+
+<p>The <dfn method for=NamedNodeMap><code>setNamedItemNS(<var>attr</var>)</code></dfn> method steps are
+to return the result of <a lt="set an attribute">setting an attribute</a> given <var>attr</var>,

Also not sure why this is being changed.

> @@ -4279,7 +4281,7 @@ empty string instead, and then do as described below, switching on the interface
 
 <dl class=switch>
  <dt>{{Attr}}
- <dd><p><a>Set an existing attribute value</a> with <a>this</a> and the given value.
+ <dd><p><a>Set an existing attribute value</a> with <a>this</a>, the given value.

I don't understand this change.

>  
 <ol>
+ <li>
+  <p>If <var>validate</var>, then:

```suggestion
  <p>If <var>validate</var> is true, then:
```

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

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

Received on Monday, 22 April 2024 15:40:01 UTC