https://github.com/ryanve/avant
Cross-browser JavaScript events module
https://github.com/ryanve/avant
event-listener events javascript
Last synced: over 1 year ago
JSON representation
Cross-browser JavaScript events module
- Host: GitHub
- URL: https://github.com/ryanve/avant
- Owner: ryanve
- Created: 2013-10-31T06:07:17.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-09-19T12:17:03.000Z (almost 12 years ago)
- Last Synced: 2025-03-15T21:51:20.742Z (over 1 year ago)
- Topics: event-listener, events, javascript
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/avant
- Size: 238 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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