Skip to content
main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Ready

CI

DOM ready & document loaded JavaScript listeners

  • Lightweight (less than 250b minified and gzipped)
  • No dependencies
  • Supports IE 9+

Developed with ❤️ by GRRR

Installation

$ npm install @grrr/ready

Note: depending on your setup additional configuration might be needed, since this package is published with untranspiled JavaScript.

Usage

Import into your main JavaScript file:

import { onDocumentLoaded, onDomReady } from "@grrr/ready";

onDomReady(() => {
    // Execute main functions
});

onDocumentLoaded(() => {
    // Execute functions after the document has fully loaded
});

DOM ready

The onDomReady function:

Document loaded

The onDocumentLoaded function:

About

DOM ready & document loaded JavaScript listeners

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •