@cfware/loading

1.0.0 • Public • Published

@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>
<html lang="en-US">
	<head>
		<meta charset="utf-8">

		<script type="module" src="loading.js"></script>
		<script type="module" defer src="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.

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i @cfware/loading

    Weekly Downloads

    4

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    6.15 kB

    Total Files

    5

    Last publish

    Collaborators

    • coreyfarrell