import { type dom } from "https://deno.land/x/evt@v2.4.7/lib/index.ts";
const { Selection } = dom;
A Selection object represents the range of text selected by the user or the current position of the caret. To obtain a Selection object for examination or modification, call Window.getSelection().
Methods
addRange(range: Range): void
collapse(node: Node | null, offset?: number): void
containsNode(node: Node, allowPartialContainment?: boolean): boolean
extend(node: Node, offset?: number): void
getRangeAt(index: number): Range
removeRange(range: Range): void
selectAllChildren(node: Node): void
setPosition(node: Node | null, offset?: number): void