dom-event

Add/remove DOM events

Usage no npm install needed!

<script type="module">
  import domEvent from 'https://cdn.skypack.dev/dom-event';
</script>

README

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!')
}