@jetjs/jetjs

interface Jetjs

Jet.js public interface to register and excute plugins


A longer documentation will follow.

Properties

PropertyTypeDescription
init
(opts: Options) => void
registerPlugin
(name: PluginName, fn: PluginFactory) => void
registerPluginAlias
(alias: PluginName, name: PluginName, defaultParameter: PluginParameter) => void
registerPluginChain
(alias: PluginName, fn: PluginChainFactory) => void
run
(elements: HTMLElement | HTMLElement[]) => void
searchAndRun
(element: HTMLElement) => void

Property Details

  • init Property

    initiates jet.js

    Signature:
    init: (opts: Options) => void;
  • registerPlugin Property

    register Plugin function, so its easier to write Plugins, if the plugin developer doesn't want to import PluginRegistry.

    Signature:
    registerPlugin: <T, E, O>(name: PluginName, fn: PluginFactory<T, E, O>) => void;
  • registerPluginAlias Property

    register Plugin Alias function, so its easier to write Plugins, if the plugin developer doesn't want to import PluginRegistry.

    Signature:
    registerPluginAlias: <T, E>(alias: PluginName, name: PluginName, defaultParameter: PluginParameter) => void;
  • registerPluginChain Property

    register Plugin Chain function, so its easier to write Plugins, if the plugin developer doesn't want to import PluginRegistry.

    Signature:
    registerPluginChain: (alias: PluginName, fn: PluginChainFactory) => void;
  • run Property

    Parses and Executes the plugin definition on the given element.

    Signature:
    run: (elements: HTMLElement | HTMLElement[]) => void;
  • searchAndRun Property

    Searches for all elements with plugin definitions below the given element and executes them

    Signature:
    searchAndRun: (element: HTMLElement) => void;