# customevent

> CustomEvent ponyfill

Latest version **1.0.1** (published 2019-02-14) · MIT license · 0 weekly downloads

## Install

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

## 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 | 1.0.1 |
| Published | 2019-02-14 |
| First published | 2016-07-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 0 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Alex Cross |
| Maintainers | awcross |
| Keywords | custom, event, customevent, ponyfill, polyfill, shim, browser |

## Links

- npm: https://www.npmjs.com/package/customevent
- Repository: https://github.com/awcross/customevent
- Homepage: https://github.com/awcross/customevent#readme
- Issues: https://github.com/awcross/customevent/issues
- npm.io page: https://npm.io/package/customevent

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

- 1.0.1 (latest) — 2019-02-14
- 1.0.0 — 2016-09-24
- 0.1.1 — 2016-07-23
- 0.1.0 — 2016-07-23

## README

# customevent [![Build Status](https://travis-ci.org/awcross/customevent.svg?branch=master)](https://travis-ci.org/awcross/customevent)

> [Ponyfill](https://ponyfill.com) for [`CustomEvent`](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent)


## Install

```
$ npm install --save customevent
```


## Usage

```js
const customEvent = require('customevent');

const event = new customEvent('click', {
	cancelable: true,
	bubbles: false,
	detail: {
		foo: 'bar'
	}
});
```


## API

### customEvent(typeArg, [customEventInit])

Creates a custom event and returns an event

#### typeArg

Type: `string`

A [DOMString](https://developer.mozilla.org/en-US/docs/Web/API/DOMString) representing the name of the event.

#### customEventInit (optional)

Type: `object`


## License

MIT © [Alex Cross](https://alexcross.io)

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