htz-dispatch-event
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

Custom Event Dispatcher

A convenience utility for firing a synthesized event.

Uses the CustomEvent constructor, which requires polyfill (provided by polyfill.io) in IE.

The function takes three arguments:

  • target: An HTMLElement, which will be used to dispatch the event and determines which event listeners will be invoked;
  • type: A string representing the name of the dispatched event;
  • detail: An optional value, of any type, which is an event-dependent value associated with the event.

Readme

Keywords

none

Package Sidebar

Install

npm i htz-dispatch-event

Weekly Downloads

1

Version

1.1.2

License

MIT

Last publish

Collaborators

  • txhawks