Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ryanve/avant

Cross-browser JavaScript events module
https://github.com/ryanve/avant

event-listener events javascript

Last synced: about 1 month ago
JSON representation

Cross-browser JavaScript events module

Awesome Lists containing this project

README

        

# avant
#### Cross-browser JavaScript events module

```sh
$ npm install avant --save
```

### Basic usage

```js
var avant = require('avant');
avant.listen(document, 'click', function(event) {
console.log(event)
});
```

## API

### `avant.listen(node, type, listener)`
- Add an event listener for the specified event type

### `avant.unlisten(node, type, listener)`
- Remove the event listener for the specified event type

### `avant.support(type, node|tagname?)`
- Detect if the node supports the event type
- → boolean

## License
MIT