Skip to content

emilbayes/dom-once

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

.once for DOM Events

Resources

License

Stars

Watchers

Forks

Packages

No packages published