Options
All
  • Public
  • Public/Protected
  • All
Menu

A FragmentSelectorParser implementation used for parsing EPUB CFI fragment selectors.

Add an instance of this class to a SelectorFactory to enable support for parsing EPUB CFI strings.

Hierarchy

  • EpubCfiFragmentSelectorParser

Implements

Index

Constructors

Methods

  • canParseFragment(fragment: string): boolean
  • Should return true if this instance is able to parse the fragment value into a Selector implementation. If this method returns true, parseFragment() will be called by the SelectorFactory with the fragment value.

    Parameters

    • fragment: string

    Returns boolean

  • getFragmentSpecificationIri(): string
  • Parses the fragment into a Selector implementation. This method must only be called if canParseFragment() returns true for the specified fragment value. Note that the parsing can fail and return null even if canParseFragment() returns true.

    Parameters

    Returns EpubCfiSelector

Generated using TypeDoc