Skip to content

Commit 5aeccfd

Browse files
authored
Editorial: clarify document argument of "clone a node"
This argument is only passed recursively or from importNode(). And importNode() does not work for documents, so whenever the node argument is a document, the document argument has to be the node argument.
1 parent 7801c9d commit 5aeccfd

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

dom.bs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4550,9 +4550,12 @@ steps:
45504550
dom-Range-extractContents, dom-Range-cloneContents -->
45514551

45524552
<ol>
4553-
<li><p>If <var>document</var> is not given, let <var>document</var> be <var>node</var>'s
4553+
<li><p>If <var>document</var> is not given, then set <var>document</var> to <var>node</var>'s
45544554
<a for=Node>node document</a>.
45554555

4556+
<li><a for=/>Assert</a>: <var>node</var> is not a <a for=/>document</a> or <var>node</var> is
4557+
<var>document</var>.
4558+
45564559
<li>
45574560
<p>If <var>node</var> is an <a for=/>element</a>, then:
45584561

@@ -4606,9 +4609,10 @@ dom-Range-extractContents, dom-Range-cloneContents -->
46064609
<dd><p>Do nothing.
46074610
</dl>
46084611

4609-
<li><p>Set <var>copy</var>'s <a for=Node>node document</a> and <var>document</var> to
4610-
<var>copy</var>, if <var>copy</var> is a <a>document</a>, and set <var>copy</var>'s
4611-
<a for=Node>node document</a> to <var>document</var> otherwise.
4612+
<li><p>If <var>node</var> is a <a for=/>document</a>, then set <var>document</var> to
4613+
<var>copy</var>.
4614+
4615+
<li><p>Set <var>copy</var>'s <a for=Node>node document</a> to <var>document</var>.
46124616

46134617
<li><p>Run any <a>cloning steps</a> defined for <var>node</var> in
46144618
<a>other applicable specifications</a> and pass <var>copy</var>, <var>node</var>,

0 commit comments

Comments
 (0)