Re: [whatwg/dom] Introduce `moveBefore()` state-preserving atomic move API (PR #1307)

@annevk commented on this pull request.



> + <li><p>If <var>parent</var> is not a {{Document}}, {{DocumentFragment}}, or {{Element}}
+ <a for=/>node</a>, then <a>throw</a> a "{{HierarchyRequestError!!exception}}" {{DOMException}}.
+
+ <li><p>If <var>node</var> is a <a>host-including inclusive ancestor</a> of <var>parent</var>, then
+ <a>throw</a> a "{{HierarchyRequestError!!exception}}" {{DOMException}}.
+
+ <li><p>If <var>child</var> is non-null and its <a for=tree>parent</a> is not <var>parent</var>,
+ then <a>throw</a> a "{{NotFoundError!!exception}}" {{DOMException}}.
+
+ <li><p>If <var>node</var> is not an {{Element}} or a {{CharacterData}} <a for=/>node</a>, then
+ <a>throw</a> a "{{HierarchyRequestError!!exception}}" {{DOMException}}.</p></li>
+
+ <li><p>If <var>node</var> is a {{Text}} <a for=/>node</a> and <var>parent</var> is a
+ <a>document</a>, then <a>throw</a> a "{{HierarchyRequestError!!exception}}" {{DOMException}}.
+
+ <li><p>If <var>parent</var> is a {{Document}}, <var>node</var> is an {{Element}}

I think in that case there's multiple nodes so it's clearer to go for the longer "X node" concept as there's multiple of X. You could do "Document node" here too, but generally we shorten that where we can.

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

Message ID: <whatwg/dom/pull/1307/review/2499683410@github.com>

Received on Thursday, 12 December 2024 13:46:03 UTC