@groupby/elements-dom-events-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

GroupBy Elements DOM Events Plugin

This package contains the GB Elements DomEventsPlugin class.

Usage

To use the DomEventsPlugin, first instantiate it and then register it with the Core entity:

const domEventsPlugin = new DomEventsPlugin(/* options */);
core.register(domEventsPlugin);

The plugin's constructor takes an optional options object. Please refer to the DomEventsPluginOptions interface in src/dom-events-plugin.ts for more details on available options.

Methods

registerListener()

Use the registerListener method to register event listeners. The method takes an eventName and a callback function.

registerListener(eventName, callback);

unregisterListener()

Use the unregisterListener method to unregister event listeners. The method takes an eventName and a callback function.

unregisterListener(eventName, callback);

dispatchEvent()

Use the dispatchEvent method to dispatch events. The method takes an eventName and an option payload which can be used to send information with the dispatched event.

dispatchEvent(eventName, payload);

Readme

Keywords

none

Package Sidebar

Install

npm i @groupby/elements-dom-events-plugin

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

34.5 kB

Total Files

34

Last publish

Collaborators

  • mykola_bova
  • adruzhkin-gbi
  • anton.shakhlovich
  • artem_konstantinov
  • andzinchenko
  • yberkut-gbi
  • romangbi
  • francoisvongue
  • gleb.bondarenko.gb
  • pavel-shakhlovich
  • jonapgar-groupby
  • kseniya.kondrashevich
  • owengbi
  • yanishgbi
  • jasonwelsh
  • groupby-ops
  • groupby-ci
  • groupbyops
  • daniel-moniz-gbi
  • johanntutorgbi
  • dmytro-kyiashko
  • roman.lis