Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cfware/loading
Display a loading spinner until the `loaded` attribute is set to the document body.
https://github.com/cfware/loading
Last synced: about 2 months ago
JSON representation
Display a loading spinner until the `loaded` attribute is set to the document body.
- Host: GitHub
- URL: https://github.com/cfware/loading
- Owner: cfware
- License: mit
- Created: 2020-09-22T19:36:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-16T21:49:16.000Z (about 1 year ago)
- Last Synced: 2024-10-30T17:32:50.380Z (2 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @cfware/loading [![NPM Version][npm-image]][npm-url]
Display a loading spinner until the `loaded` attribute is set to the document body.
## Usage
Create `loading.js`:
```js
import '@cfware/loading';
```Create `index.html`:
```html
```
Create `app.js`, ensure it runs `document.body.setAttribute('loaded', '')` when the
application is ready to be displayed.[npm-image]: https://img.shields.io/npm/v/@cfware/loading.svg
[npm-url]: https://npmjs.org/package/@cfware/loading