synthetic-dom-events

create DOM events for builtin event types

npm install synthetic-dom-events
15 downloads in the last day
55 downloads in the last week
110 downloads in the last month

synthetic-dom-events

Build Status

example

var event = require('synthetic-dom-events');

// event just returns a correctly created dom event object
// you are responsible for emitting it
var ev = event('click', { button: 2 });

var element = document.createElement('button');
element.dispatchEvent(ev);

// or legacy IE
//element.fireEvent('on' + ev.type, ev);
npm loves you