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.


var staticRange = new StaticRange(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.


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

Browser Compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

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,