Options
All
  • Public
  • Public/Protected
  • All
Menu

Used for programmatically building EPUB CFI model objects from XML-based documents. This class is used internally by the framework and is not intended to be used by framework users.

Hierarchy

  • IEpubCfiBuilder

Implemented by

Index

Methods

appendLocalPathTo

  • appendLocalPathTo(element: Element): void
  • Creates a new IEpubCfiLocalPathNode with all steps necessary to select the specified element from its owner document.

    Parameters

    • element: Element

    Returns void

appendTerminalDomPosition

  • appendTerminalDomPosition(container: Node, offset: number): void
  • Appends a terminal local path to the specified container node and offset. If the container node is an Element, the offset specifies the child node within that element. If the container node is a Text node, the offset specified the character offset.

    Parameters

    • container: Node
    • offset: number

    Returns void

appendTerminalDomRange

  • appendTerminalDomRange(range: Range): void
  • Appends a terminal range to the EPUB CFI model.

    Parameters

    • range: Range

    Returns void

appendTerminalIndirection

  • appendTerminalIndirection(): void
  • Returns void

clone

  • Creates a clone of this instance including all state.

    Returns IEpubCfiBuilder

collapseToEnd

  • collapseToEnd(): void
  • Collapses the range epubcfi to its end position. If the epubcfi does not define a range, nothing is done.

    Returns void

collapseToStart

  • collapseToStart(): void
  • Collapses the range epubcfi to its start position. If the epubcfi does not define a range, nothing is done.

    Returns void

getEpubCfiRootNode

  • Get the IEpubCfiRootNode containing all paths and steps appended with this builder.

    Returns IEpubCfiRootNode

prependLocalPathTo

  • prependLocalPathTo(element: Element): void
  • Parameters

    • element: Element

    Returns void

toString

  • toString(): string
  • Serializes the current state of the EPUB CFI model as a selector fragment string.

    Returns string

Generated using TypeDoc