Skip to content

Repository files navigation

custom-event

Cross-browser CustomEvent constructor

Sauce Test Status

Build Status

https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent

Installation

$ npm install custom-event

Example

varCustomEvent=require('custom-event');// add an appropriate event listenertarget.addEventListener('cat',function(e){process(e.detail)});// create and dispatch the eventvarevent=newCustomEvent('cat',{detail: {hazcheeseburger: true}});target.dispatchEvent(event);

About

Cross-browser `CustomEvent` constructor

Resources

Stars

99 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages