- From: Noam Rosenthal <notifications@github.com>
- Date: Tue, 10 Mar 2026 02:05:31 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/1454/review/3920845800@github.com>
@noamr commented on this pull request.
> +<div algorithm>
+<p>To <dfn>update attributes from data</dfn> for a {{ProcessingInstruction}} <a for=/>node</a>
+<var>pi</var>:
+
+<ol>
+ <li><p><a for=map>Clear</a> <var>pi</var>'s <a for=ProcessingInstruction>attribute map</a>.
+
+ <li><p>Let <var>context</var> be the result of <a>creating an element</a> given
+ <var>pi</var>'s <a>node document</a>, "<code>html</code>", and the <a>HTML namespace</a>.
+
+ <li><p>Let <var>markup</var> be the concatentation of "<code><attrs </code>",
+ <var>pi</var>'s <a for=CharacterData>data</a>, and
+ "<code>></attrs></code>".
+
+ <li><p>Let <var>fragment</var> be the result of invoking the
+ <a>fragment parsing algorithm steps</a> with <var>context</var> and <var>markup</var>.
> I'm not sure why we need to preserve the error conditions for the XML case.
>
> I don't think it's acceptable that the behavior of `new ProcessingInstruction(..., ...)` ends up depending on the global in which you invoke it. That's not good design.
But that is a the case for all the DOM constructors, no? It's a side effect of associating the node to the document associated with the global object.
I am not opposed to an alternative, but not sure how to deal with attribute name casing.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1454#discussion_r2910324516
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/dom/pull/1454/review/3920845800@github.com>
Received on Tuesday, 10 March 2026 09:05:38 UTC