Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: clarify document argument of "clone a node" #1332

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4551,9 +4551,12 @@ steps:
dom-Range-extractContents, dom-Range-cloneContents -->

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

<li><a for=/>Assert</a>: <var>node</var> is not a <a for=/>document</a> or <var>node</var> is
<var>document</var>.

<li>
<p>If <var>node</var> is an <a for=/>element</a>, then:

Expand Down Expand Up @@ -4608,9 +4611,7 @@ dom-Range-extractContents, dom-Range-cloneContents -->
<dd><p>Do nothing.
</dl>

<li><p>Set <var>copy</var>'s <a for=Node>node document</a> and <var>document</var> to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't this text needed to make a cloned document have the right node document (itself, not the document it was cloned from)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that's indeed what it was for. Should be good now (and hopefully clearer too).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, agree the new version is clearer.

<var>copy</var>, if <var>copy</var> is a <a>document</a>, and set <var>copy</var>'s
<a for=Node>node document</a> to <var>document</var> otherwise.
<li><p>Set <var>copy</var>'s <a for=Node>node document</a> to <var>document</var>.

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