This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

cloneRange

Summary

Returns a new range with boundary points that are equal to the original range.

Method of dom/Rangedom/Range

Syntax

var clone = range.cloneRange();

Return Value

Returns an object of type RangeRange

Examples

var range = document.createRange();
range.selectNode(document.getElementsByTagName("div").item(0));
var clone = range.cloneRange();

Syntax

clone = range.cloneRange();

Standards information

Attributions