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

  • EpubCfiBuilder

Implements

Index

Constructors

constructor

  • Creates a new instance.

    Parameters

    • Optional rootNode: IEpubCfiRootNode

      An existing IEpubCfiRootNode to use, otherwise a new empty root node is created.

    Returns EpubCfiBuilder

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

appendTerminalIndirection

  • appendTerminalIndirection(): void

clone

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

prependLocalPathTo

  • prependLocalPathTo(element: Element): void

toString

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

    Returns string

Generated using TypeDoc