@jetjs/core

class PluginParser

Plugin Parser searches the DOm for plugin definitions and uses the generated Parser to create the AST. After Parsing is done, the parameters are extracted from the DOM and assinged to the AST.

Methods

MethodReturnDescription
findAll(element)
HTMLElement[]
parse(nodes, callback, errorCallback)
void

Method Details

  • findAll(element) Method

    Signature:
    findAll(element: HTMLElement): HTMLElement[];
    Returns:
    HTMLElement[]
    ParameterTypeDescription
    element
    HTMLElement
  • parse(nodes, callback, errorCallback) Method

    Signature:
    parse(nodes: HTMLElement[], callback: ParseCallback, errorCallback?: ParseErrorCallback): void;
    Returns:
    void
    ParameterTypeDescription
    nodes
    HTMLElement[]

    array of HTMLElements to parse (use [].slice.call(document.querySelectorAll<HTMLElement>(".selector")) to convert a NodeList to an array of HTMLElements)

    callback
    ParseCallback

    function to call with parsed PluginDefinitions

    errorCallback
    ParseErrorCallback