customevent

1.0.1 • Public • Published

customevent Build Status

Ponyfill for CustomEvent

Install

$ npm install --save customevent

Usage

const customEvent = require('customevent');
 
const event = new customEvent('click', {
    cancelable: true,
    bubbles: false,
    detail: {
        foo: 'bar'
    }
});

API

customEvent(typeArg, [customEventInit])

Creates a custom event and returns an event

typeArg

Type: string

A DOMString representing the name of the event.

customEventInit (optional)

Type: object

License

MIT © Alex Cross

Package Sidebar

Install

npm i customevent

Weekly Downloads

3,397

Version

1.0.1

License

MIT

Unpacked Size

3.17 kB

Total Files

4

Last publish

Collaborators

  • awcross