# eventtarget

> W3C JavaScript events for custom objects

Latest version **0.1.0** (published 2015-02-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install eventtarget
pnpm add eventtarget
yarn add eventtarget
bun add eventtarget
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2015-02-20 |
| First published | 2014-02-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Mr. Doob |
| Maintainers | piranna |
| Keywords | EventTarget, events, W3C |

## Links

- npm: https://www.npmjs.com/package/eventtarget
- Repository: https://github.com/ShareIt-project/EventTarget.js
- Issues: https://github.com/ShareIt-project/EventTarget.js/issues
- npm.io page: https://npm.io/package/eventtarget

## 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

- 0.1.0 (latest) — 2015-02-20
- 0.0.1 — 2014-02-27
- 0.0.0-1 — 2014-02-27
- 0.0.0 — 2014-02-17

## README

eventtarget.js
========

#### JavaScript events for custom objects ####

### Usage ###

```html
<script src="EventTarget.js"></script>
<script>

	// Applying EventTarget to custom object

	var Car = function () {

		EventTarget.call( this );

		this.start = function () {

			this.dispatchEvent( { type: 'started', foo: 'bar' } );

		};

	};


	// Using events

	var car = new Car();
	car.addEventListener( 'started', function ( event ) {

		alert( 'vroom vroom!' );

	} );
	car.start();

</script>
```

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