loadPromises
Expose the page load events as promises. Works in any browser that supports promises, or that has a compatible polyfill.
Install
With NPM
$ npm install load-promises
With Yarn
$ yarn add load-promises
Usage
With webpack. The package has a module
field. Tree shaking is possible if you
only use one of the events.
; // Equivalent of $(document).ready();; // Equivalent of $(window).load();;
In a browser. Both promises are namespaced in loadPromises