Skip to main content

DOMSelectionBoundaryPoints

interface

A subset of `Selection` covering the four boundary-point fields Lexical reads plus `direction`. Designed so a `Selection` instance can be returned where a `DOMSelectionBoundaryPoints` is expected (see getDOMSelectionPoints). `direction` is the standard Selection.direction (https://developer.mozilla.org/docs/Web/API/Selection/direction) pass-through: `'forward'` / `'backward'` / `'none'` when the engine implements it, or `undefined` when a future engine ships `getComposedRanges` without `direction` (no current shipping configuration matches — every engine that ships the former also ships the latter). In the undefined case anchor/focus default to the composed StaticRange's tree order; callers needing strict backward fidelity inside a shadow root should check `direction !== undefined`.

interface DOMSelectionBoundaryPoints

Import

import { DOMSelectionBoundaryPoints } from '@modular/sdk/editor';

Members5

anchorNode
Node | null
anchorOffset
number
directionoptional
undefined | 'forward' | 'backward' | 'none'
focusNode
Node | null
focusOffset
number