document-ready

Document ready listener for modern browsers

MIT 7 个版本
安装
npm install document-ready
yarn add document-ready
pnpm add document-ready
bun add document-ready
README

document-ready Build Status

Document ready listener for modern browsers

Install

$ npm install --save document-ready

Usage

var ready = require('document-ready')

ready(function () {
  //=> DOM is ready
})

API

ready(callback) -> undefined

callback

Required
Type: function

A function to call once the DOM has loaded. If the DOM is already loaded, the callback will be called on the next tick.

License

MIT © Ben Drucker

版本列表
2.0.2 2018-11-30
2.0.1 2017-03-27
2.0.0 2017-03-23
1.0.3 2016-08-31
1.0.2 2016-07-05
1.0.1 2016-07-04
1.0.0 2015-10-09