- From: Philip Jägenstedt <notifications@github.com>
- Date: Mon, 09 Mar 2026 06:37:48 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 9 March 2026 13:37:52 UTC
@foolip commented on this pull request.
> @@ -6005,11 +6005,15 @@ method steps are:
"<code>?></code>", then <a>throw</a> an
"{{InvalidCharacterError!!exception}}" {{DOMException}}. <!-- Gecko does this. -->
- <li>Return a new {{ProcessingInstruction}}
+ <li>Let <var>pi</var> be a new {{ProcessingInstruction}}
Done in the style of event's "initialize" which required disambiguation invocations of that.
Not setting target and data on creation does leave the two undefined until "initialize" is called since https://dom.spec.whatwg.org/#concept-pi-target and https://dom.spec.whatwg.org/#concept-cd-data don't have defaults. Saying that they default to the empty string would be weird in the case of `target` since that cannot be the empty string after creation+initialization.
If you think this is ugly we could instead make it a "validate target and data" algorithm that only has the exception-throwing bits.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1454#discussion_r2905482694
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/dom/pull/1454/review/3915476379@github.com>
Received on Monday, 9 March 2026 13:37:52 UTC