Returns a new Range
object.
range = document.createRange();
range
is the created Range
object.
var range = document.createRange(); range.setStart(startNode, startOffset); range.setEnd(endNode, endOffset);
Once a Range
is created, you need to set its boundary points before you can make use of most of its methods.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/document/createRange