node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »

simulate-event

Simulate Event

NPM version NPM downloads Build status Test coverage

Simply trigger DOM events on any element.

Installation

npm install simulate-event --save-dev

Usage

// Simulate an event on an element 
simulateEvent.simulate(document.body, 'click');
 
// Generate an event for custom use 
var evt = simulateEvent.generate('click', { clientX: 10 });

License

MIT