Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/ryanve/avant
- Owner: ryanve
- Created: 2013-10-31T06:07:17.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-09-19T12:17:03.000Z (about 10 years ago)
- Last Synced: 2024-09-10T19:14:56.375Z (2 months 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