Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

custom-event-universal

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

custom-event-universal

Cross-browser `CustomEvent` constructor. Forked from webmodules/custom-event and modified to not error when browser globals aren't available.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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);

Keywords

dom

FAQs

Package last updated on 07 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts