Firefox Tomorrow

web api interface

Range

View on MDN ↗

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 createRange() method. Range objects can also be retrieved by using the getRangeAt() method of the Selection object or the caretRangeFromPoint() method of the Document object.

There also is the Range() constructor available.

Constructor

  • Range()
    • : Returns a Range object with the global Document as its start and end.

Instance properties

Also inherits properties from its parent interface, AbstractRange.

Instance methods

There are no inherited methods.

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also