synthetic-dom-events
v0.3.0
Published
create DOM events for builtin event types
Downloads
3,509
Readme
synthetic-dom-events
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);