# add-event-listener-delegate

> A light-weight library to add event listeners that use delegation. This is helpful, if you have frequently changing child elements. Works similar to jQuery.on() method.

Latest version **2.0.2** (published 2018-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install add-event-listener-delegate
pnpm add add-event-listener-delegate
yarn add add-event-listener-delegate
bun add add-event-listener-delegate
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2018-08-28 |
| First published | 2018-08-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Thorben Nissen |
| Maintainers | thorbennissen |
| Keywords | event, listener, delegate, children |

## Links

- npm: https://www.npmjs.com/package/add-event-listener-delegate
- Repository: https://github.com/thommyhh/add-event-listener-delegate
- Homepage: https://github.com/thommyhh/add-event-listener-delegate#readme
- Issues: https://github.com/thommyhh/add-event-listener-delegate/issues
- npm.io page: https://npm.io/package/add-event-listener-delegate

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 2.0.2 (latest) — 2018-08-28
- 2.0.1 — 2018-08-28
- 2.0.0 — 2018-08-28
- 1.0.1 — 2018-08-28
- 1.0.0 — 2018-08-28

## README

# 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
```bash
npm install
# or
yarn
```
or use
```bash
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
```javascript
let addEventListenerDelegate = require('add-event-listener-delegate').default
```
or
```javascript
import addEventListenerDelegate from 'add-event-listener-delegate'
```

If you need to have the function in global namespace use
```javascript
window.addEventListenerDelegate = addEventListenerDelegate
```

---
_Source: https://npm.io/package/add-event-listener-delegate · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
