Options
All
  • Public
  • Public/Protected
  • All
Menu

Tagger: parses, produces and numbers chunks and ideas.

Index

Functions

default

  • default(document: Document, options: Config): void
  • Recognizes and tags chunks and ideas in a document

    Parameters

    • document: Document

      DOM document

    • options: Config

      config options

    Returns void

    mutates DOM document with marked chunks by markElementsToBeTagged.

hasAncestorChunk

  • hasAncestorChunk(testedEl: Element, elements: NodeListOf<Node>): boolean
  • Determines whether the tested element has an inclusive descendant in the list of elements.

    Parameters

    • testedEl: Element

      Element to be tested

    • elements: NodeListOf<Node>

      List of elements

    Returns boolean

    Returns the boolean value of the assertion

markElementsToBeTagged

  • markElementsToBeTagged(document: Document, root: string, selectors: Selectors): void
  • Mark DOM Elements to be tagged

    remarks

    Skips nested nodes and nodes with TagClass.Skip enum string (and their child * nodes).

    Parameters

    • document: Document

      DOM document

    • root: string

      Root element

    • selectors: Selectors

      Array of selectors or a SelectorFn

    Returns void

    Modifies DOM document

numberEls

  • numberEls(document: Document, selector: DOMStringLike, name: string): void
  • Numbers selected elements (<1…n>), adding a data attribute and an numbered id attribute (<name>#).

    Parameters

    • document: Document

      DOM document

    • selector: DOMStringLike

      DOMString

    • name: string

      Name used in creating id attributes (#)

    Returns void

    Modifies DOM document

tagIdeas

  • tagIdeas(document: Document, delimiter: Delimiter): void

Generated using TypeDoc