dom-once

1.0.0 • Public • Published

dom-once

Build Status

.once for DOM Events

Usage

var once = require('dom-once')
 
 
once(document.body, 'load', function () {
  console.log('Hello world')
})

API

once(target, type, listener [, useCapture])

Works like target.addEventListener(type, listener, useCapture) / target.removeEventListener(type, listener) just all automagically. No fluf, no fuss, plain and simple

Install

npm install dom-once

License

ISC

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1

Package Sidebar

Install

npm i dom-once

Weekly Downloads

1

Version

1.0.0

License

Proprietary

Last publish

Collaborators

  • emilbayes