开发者社区> 镜像站> NPM> dom-once
dom-once
.once for DOM Events
Last updated 4 years ago by emilbayes .
Proprietary · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install dom-once 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.0                                ...           latest (4 years ago)

1 Versions

  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (1)
Dependents (0)
None