JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q47372F
  • License MIT

This micro-library will allow you to easily delay code execution until the DOM is loaded.

Package Exports

  • domloaded

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (domloaded) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

domloaded

This micro-library will allow you to easily delay code execution until the DOM is loaded.

Install w/ Express

First install the npm package.

npm install domloaded

Then serve the built script files up.

app.use('/domloaded', express.static('node_modules/domloaded/dist'));

And finally link the script in your HTML/view.

<script src="/domloaded/ready.min.js"></script>

Usage

It's easy. Works like this:

domloaded(() => { /* dom is loaded... */ });