You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
ganga satish kumar 68a25e4b2a styling update 3 years ago
..
test languages strings 3 years ago
.npmignore languages strings 3 years ago
.travis.yml languages strings 3 years ago
History.md languages strings 3 years ago
LICENSE languages strings 3 years ago
Makefile languages strings 3 years ago
README.md languages strings 3 years ago
index.js languages strings 3 years ago
package.json languages strings 3 years ago

README.md

custom-event

Cross-browser CustomEvent constructor

Sauce Test Status

Build Status

https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent

Installation

$ npm install custom-event

Example

var CustomEvent = require('custom-event');

// add an appropriate event listener
target.addEventListener('cat', function(e) { process(e.detail) });

// create and dispatch the event
var event = new CustomEvent('cat', {
  detail: {
    hazcheeseburger: true
  }
});
target.dispatchEvent(event);