- From: smaug---- <notifications@github.com>
- Date: Thu, 15 Feb 2024 01:55:12 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/1247/review/1882307968@github.com>
@smaug---- commented on this pull request. > - <li><p>If <var>attribute</var> is null, create 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>, - then <a lt="append an attribute">append</a> this <a>attribute</a> to <a>this</a>, 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>local name</a> is + <var>qualifiedName</var> and <a for=Node>node document</a> is <a>this</a>'s + <a for=Node>node document</a>. + + <li><p><a>Validate and set attribute value</a> <var>value</var> for <var>attribute</var>, + with <a>this</a>. + + <li><p><a lt="append an attribute">Append</a> <var>attribute</var> to <a>this</a>. This has also the problem that since validation may run scripts, the attribute list may now already have attribute with the same name. And validation may throw an exception. (but yeah, in general these checks do need to happen very early when we're about to set an attribute) -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/pull/1247#pullrequestreview-1882307968 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/pull/1247/review/1882307968@github.com>
Received on Thursday, 15 February 2024 09:55:19 UTC