Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 418 Bytes

README.md

File metadata and controls

18 lines (14 loc) · 418 Bytes

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)