Re: [whatwg/dom] Define processing instruction attributes (PR #1454)

@noamr commented on this pull request.



> +<ol>
+ <li><p>Set <var>name</var> to <var>name</var> in <a>ASCII lowercase</a>.
+
+ <li><p>Return <a>this</a>'s <a for=ProcessingInstruction>attribute map</a>[<var>name</var>]
+ <a for=map>with default</a> null.
+</ol>
+</div>
+
+<div algorithm>
+<p>The
+<dfn method for=ProcessingInstruction><code>setAttribute(<var>name</var>, <var>value</var>)</code></dfn>
+method steps are:
+
+<ol>
+ <li><p>If <var>name</var> is not a <a>valid attribute local name</a>, then <a>throw</a> an
+ "{{InvalidCharacterError!!exception}}" {{DOMException}}.

I think it would be less surprising if we align with element attributes? (throw only on setters)

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

Message ID: <whatwg/dom/pull/1454/review/4262084481@github.com>

Received on Monday, 11 May 2026 09:03:27 UTC