2.0.2 • Published 6 years ago

add-event-listener-delegate v2.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

add-event-listener-delegate

This is a light-weight library for adding event listeners that can handle delegation. This behaves similar to the jQuery.on() method. The package is meant to be used in a build change with browserify or webpack, that can convert the require/import into code the browser can interpret.

Installation

Add add-event-listener-delegate to your projects package.json and run

npm install
# or
yarn

or use

npm install add-event-listener-delegate --save-dev
# or
yarn add add-event-listener-delegate --dev

to install the package.

Usage

In your javascript use

let addEventListenerDelegate = require('add-event-listener-delegate').default

or

import addEventListenerDelegate from 'add-event-listener-delegate'

If you need to have the function in global namespace use

window.addEventListenerDelegate = addEventListenerDelegate
2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago