npm.io
1.0.1 • Published 7 years ago

customevent

Licence
MIT
Version
1.0.1
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
3

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

Keywords