Range.comparePoint() - Web APIs | MDN
developer.mozilla.org · 312 words · saved by 1 readers
The Range.comparePoint() method returns -1, 0, or 1 depending on whether the referenceNode is before, the same as, or after the Range.
Syntax js comparePoint(referenceNode, offset) Parameters referenceNode The Node that the offset is relative to. offset An integer greater than or equal to zero describing the position inside referenceNode of the point to be checked. If referenceNode is a Node of type Text, Comment, or CDATASection, then offset is the number of characters from the start of referenceNode. For other Node types, offset is the number of child nodes from the start of the referenceNode. Return value A number. -1 if the point specified by the referenceNode and offset is before the start of this Range. 0…
saved by
related reading
- Selection: focusOffset property - Web APIs | MDNdeveloper.mozilla.org
- Chloe's Gardenchloeyan.me
- Sorrel Salb | Are.naare.na
- RandomA11y - Accessible Color Combinationsrandoma11y.com
- Anime.js | JavaScript Animation Engineanimejs.com
- Zack Reneau-Wedeenzackrw.com
- Bastiat's famous Candlestick makers' Petitionbastiat.org
- indie/personal website | Are.naare.na
- Compare · Surfer-Org/Old-Protocol · GitHubgithub.com
- Roughdraft - Markdown reviews for coding agentsroughdraft.md
- shen ✸ | Are.naare.na
- Detail · Where craft livesdetail.design