docs.rodeo

MDN Web Docs mirror

Range

{{APIRef("DOM")}} 

The Range interface represents a fragment of a document that can contain nodes and parts of text nodes.

A range can be created by using the {{ domxref("Document.createRange()") }}  method. Range objects can also be retrieved by using the {{ domxref("Selection/getRangeAt", "getRangeAt()") }}  method of the {{ domxref("Selection") }}  object or the {{domxref("Document/caretRangeFromPoint", "caretRangeFromPoint()")}}  method of the {{domxref("Document")}}  object.

There also is the {{domxref("Range.Range()", "Range()")}}  constructor available.

{{InheritanceDiagram}} 

Instance properties

There are no inherited properties.

Constructor

Instance methods

There are no inherited methods.

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN