StaticRange.StaticRange()

Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

The StaticRange() constructor creates a new StaticRange object which provides attributes that track the start and end position of a range, and a boolean attribute indicating whether the current range is collapsed into a single position.

Syntax

var staticRange = new StaticRange(options)

Parameters

options
Options are as follows:
  • startContainer:  The start Node for the range.
  • startOffset: The offset into the start node of the range's start position.
  • endContainer: The end Node for the range.
  • endOffset: The offset into the start node of the range's start position.

Specifications

Specification Status Comment
Static Range
The definition of 'StaticRange()' in that specification.
Editor's Draft Initial definition.

Browser Compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 60 ? ? ? ?
Feature Android Webview Chrome for Android Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile
Basic support 60 60 ? ? ? ? ?

Document Tags and Contributors

 Contributors to this page: jpmedley
 Last updated by: jpmedley,