Options
All
  • Public
  • Public/Protected
  • All
Menu

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().

Hierarchy

  • Selection

Index

Properties

anchorNode: null | internal.Node
anchorOffset: number
focusNode: null | internal.Node
focusOffset: number
isCollapsed: boolean
rangeCount: number
type: string

Methods

  • Parameters

    Returns void

  • Parameters

    Returns void

  • collapseToEnd(): void
  • Returns void

  • collapseToStart(): void
  • Returns void

  • containsNode(node: internal.Node, allowPartialContainment?: boolean): boolean
  • Parameters

    • node: internal.Node
    • Optional allowPartialContainment: boolean

    Returns boolean

  • deleteFromDocument(): void
  • Returns void

  • empty(): void
  • Returns void

  • Parameters

    Returns void

  • Parameters

    • index: number

    Returns internal.Range

  • modify(alter?: string, direction?: string, granularity?: string): void
  • Parameters

    • Optional alter: string
    • Optional direction: string
    • Optional granularity: string

    Returns void

  • removeAllRanges(): void
  • Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • setPosition(node: null | internal.Node, offset?: number): void
  • Parameters

    Returns void

  • toString(): string
  • Returns string

Generated using TypeDoc