This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2020.
The read-only startOffset property of the StaticRange interface returns the offset into the start node of the range's start position.
An integer value indicating the number of characters into the Node indicated by startContainer at which the first character of the range is located.
| Specification |
|---|
| DOM> # ref-for-dom-range-startoffset①> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
startOffset |
60 | 18 | 69 | 47 | 10.1 | 60 | 79 | 44 | 10.3 | 8.0 | 60 | 10.3 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/StaticRange/startOffset