custom-event (1.0.1)
Published 2026-02-24 13:55:00 +00:00 by atheaadmin
Installation
registry=npm install custom-event@1.0.1"custom-event": "1.0.1"About this package
custom-event
Cross-browser CustomEvent constructor
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);
Dependencies
Development Dependencies
| ID | Version |
|---|---|
| zuul | ~1.16.3 |
Keywords
dom
browser
event
custom
customevent
constructor