window-load
v1.0.0
Published
Call a callback on window load
Downloads
19,982
Readme
window-load
Call a callback on window load
Install
$ npm install --save window-load
Usage
var onLoad = require('window-load')
onLoad(function () {
//=> window is loaded
})
API
onLoad(callback)
-> undefined
callback
Required
Type: function
A callback to call on window load. If window load has already occurred, the callback will be called on the next tick.
License
MIT © Ben Drucker