Skip to content

tranvansang/add-evt-listener

Repository files navigation

add-evt-listener

  • Install: yarn add add-evt-listener.
  • Usage
import addEvtListener from 'add-evt-listener'
// or
const addEvtListener = require('add-evt-listener')

const removeEvtListener = addEvtListener(target, event, handler, option)
// equivalent to
target.addEventListener(event, handler, option)

removeEvtListener()
// equivalent to
target.removeEventListener(event, handler, option)

About

Convenient addEvtListener utility

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published