custom-event ============ ### Cross-browser `CustomEvent` constructor [](https://saucelabs.com/u/custom-event) [](https://travis-ci.org/webmodules/custom-event) https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent Installation ------------ ``` bash $ npm install custom-event ``` Example ------- ``` js 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); ```
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
test | Folder | 0755 |
|
|
.npmignore | File | 29 B | 0644 |
|
.travis.yml | File | 1.29 KB | 0644 |
|
History.md | File | 316 B | 0644 |
|
LICENSE | File | 1.03 KB | 0644 |
|
Makefile | File | 679 B | 0644 |
|
README.md | File | 785 B | 0644 |
|
index.js | File | 1.11 KB | 0644 |
|
package.json | File | 669 B | 0644 |
|