Ponyfill for
CustomEvent
$ npm install --save customevent
const customEvent = require('customevent');
const event = new customEvent('click', {
cancelable: true,
bubbles: false,
detail: {
foo: 'bar'
}
});
Creates a custom event and returns an event
Type: string
A DOMString representing the name of the event.
Type: object
MIT © Alex Cross