This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27565 - Step 15-1 in the clone range algorithm should specify a deep clone of the contained child.
Summary: Step 15-1 in the clone range algorithm should specify a deep clone of the con...
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: DOM (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-11 05:05 UTC by donjjordan
Modified: 2014-12-11 12:16 UTC (History)
2 users (show)

See Also:


Attachments

Description donjjordan 2014-12-11 05:05:01 UTC
Regarding the algorithm for cloning the contents of a Range at https://dom.spec.whatwg.org/#concept-range-clone

Step 15 reads:

<snip>

15. For each contained child in contained children:

    1. Let clone be a clone of contained child.

    2. Append clone to fragment.

</snip>

Step 15 should read:

15. For each contained child in contained children:

    1. Let clone be a DEEP clone of contained child.

    2. Append clone to fragment.


All of the other cloning operations in the Range specification use a shallow clone (e.g. node.cloneNode(false)). The above case only requires a deep, recursive clone of the contained child (e.g. node.cloneNode(true)). An experienced implementer can figure it out, but I think it should be clarified in the specification.