项目作者: ryanve

项目描述 :
Cross-browser JavaScript events module
高级语言: JavaScript
项目地址: git://github.com/ryanve/avant.git
创建时间: 2013-10-31T06:07:17Z
项目社区:https://github.com/ryanve/avant

开源协议:

下载


avant

Cross-browser JavaScript events module

  1. $ npm install avant --save

Basic usage

  1. var avant = require('avant');
  2. avant.listen(document, 'click', function(event) {
  3. console.log(event)
  4. });

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