Check when the DOM is loaded like `DOMContentLoaded`
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.npmrc
.travis.yml
index.js
license
package.json
readme.md
test.js

readme.md

dom-loaded Build Status

Check when the DOM is loaded like DOMContentLoaded

Unlike DOMContentLoaded, this also works when included after the DOM was loaded.

Install

$ npm install dom-loaded

Usage

const domLoaded = require('dom-loaded');

domLoaded.then(() => {
	console.log('DOM is loaded');
});

Related

License

MIT © Sindre Sorhus