Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 308 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 308 Bytes

dom-event

Add/remove DOM events

Install

$ npm install dom-event

Usage

var on = require('dom-event')
var off = on.off

on(document.body, 'click', hello) // adds the event listener
off(document.body, 'click', hello) // removes

function hello () {
  console.log('hello!')
}