Skip to content

Display a loading spinner until the `loaded` attribute is set to the document body.

License

Notifications You must be signed in to change notification settings

cfware/loading

Repository files navigation

@cfware/loading NPM Version

Display a loading spinner until the loaded attribute is set to the document body.

Usage

Create loading.js:

import'@cfware/loading';

Create index.html:

<!doctype html><htmllang="en-US"><head><metacharset="utf-8"><scripttype="module" src="loading.js"></script><scripttype="module" defersrc="app.js"></script></head><body></body></html>

Create app.js, ensure it runs document.body.setAttribute('loaded', '') when the application is ready to be displayed.

About

Display a loading spinner until the `loaded` attribute is set to the document body.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •