Small library with zero dependencies that lets you know that the content has loaded.
The library contains 3 functions that return a promise.
imagesLoaded— Waiting for all the images in the node
imageLoaded— Waiting for the picture on link
nodeLoaded— Waiting for the appearance of the node in DOM by selector. Useful when using Knockout.JS and other asynchronous libraries.
The library is distributed in the form of a Common.JS module, AMD module as well as in the form of IFFE for browser usage.
$ npm install mishamyrt-loaded --save
And then import to your project:
const imagesLoadedimageLoadednodeLoaded=const someNode = document
Download the repository code and move
dist/loaded.amd.js to the desired directory.
Then link scripts to page:
Just link script to page: