Options
All
  • Public
  • Public/Protected
  • All
Menu

A fragment of a document that can contain nodes and parts of text nodes.

Hierarchy

Index

Properties

Readonly END_TO_END

END_TO_END: number

Readonly END_TO_START

END_TO_START: number

Readonly START_TO_END

START_TO_END: number

Readonly START_TO_START

START_TO_START: number

Readonly collapsed

collapsed: boolean

Returns true if range is collapsed, and false otherwise.

Readonly commonAncestorContainer

commonAncestorContainer: <internal>.Node

Returns the node, furthest away from the document, that is an ancestor of both range's start node and end node.

Readonly endContainer

endContainer: <internal>.Node

Returns range's end node.

Readonly endOffset

endOffset: number

Returns range's end offset.

Readonly startContainer

startContainer: <internal>.Node

Returns range's start node.

Readonly startOffset

startOffset: number

Returns range's start offset.

Methods

cloneContents

cloneRange

  • Returns <internal>.Range

collapse

  • collapse(toStart?: boolean): void
  • Parameters

    • Optional toStart: boolean

    Returns void

compareBoundaryPoints

  • Parameters

    Returns number

comparePoint

  • Returns −1 if the point is before the range, 0 if the point is in the range, and 1 if the point is after the range.

    Parameters

    Returns number

createContextualFragment

deleteContents

  • deleteContents(): void
  • Returns void

detach

  • detach(): void
  • Returns void

extractContents

getBoundingClientRect

getClientRects

insertNode

  • Parameters

    Returns void

intersectsNode

  • Returns whether range intersects node.

    Parameters

    Returns boolean

isPointInRange

  • Parameters

    Returns boolean

selectNode

  • Parameters

    Returns void

selectNodeContents

  • Parameters

    Returns void

setEnd

  • Parameters

    Returns void

setEndAfter

  • Parameters

    Returns void

setEndBefore

  • Parameters

    Returns void

setStart

  • Parameters

    Returns void

setStartAfter

  • Parameters

    Returns void

setStartBefore

  • Parameters

    Returns void

surroundContents

  • Parameters

    Returns void

toString

  • toString(): string
  • Returns string

Generated using TypeDoc