creates a new
StaticRange object representing a span of content within
the DOM. It includes properties identifying the standard and end positions of
the range as well as a Boolean indicating whether or not the range is
collapsed (that is, empty).
var staticRange = new StaticRange(rangeSpec)
rangeSpecparameter is an object adhering to the
StaticRangeInitdictionary. The four required
Nodein which the starting point of the range is located.
- The offset into the starting node at which the first character of the range is found.
Nodein which the end point of the range is located.
- The offset into the node indicated by
endOffsetat which the last character in the range is located.
StaticRange object initialized with the values given in
DOMExceptionfired if either or both of the
endContainerare a type of node which you can't include in a range. Those node types are
DocumentTypenode derived from the DTD identified using the
doctypepreamble in the HTML, for example) and the
Attrnode describing an attribute of an element on the DOM..
The definition of 'StaticRange()' in that specification.
|Living Standard||Initial definition.|
BCD tables only load in the browser