iil

is-image-loaded-async

Returns a Promise when one or more images are loaded. < 1 Kb Gziped. Dependencies free.

Showing:

Popularity

Downloads/wk

4

GitHub Stars

2

Maintenance

Last Commit

4yrs ago

Contributors

1

Package

Dependencies

0

Size (min+gzip)

0.4KB

License

MIT

Type Definitions

Tree-Shakeable

Yes?

Categories

Readme

is-image-loaded-async

Return a Promise when one or more images, is loaded. <1KB, for the browser, no dependencies.

Install

At your choice

npm install --save is-image-loaded-async
yarn add is-image-loaded-async
<script src="https://unpkg.com/is-image-loaded-async"></script>

Usage

is-image-loaded-async(/* Node or NodeList*/)

Exemple

var isImageLoadedAsync = require("is-image-loaded-async")

// Multiple image
isImageLoadedAsync(document.querySelectorAll("img"))
  .then(v => console.log(v))
  .catch(e => console.log(e))
import isImageLoadedAsync from "is-image-loaded-async"

// Single image
isImageLoadedAsync(document.querySelector("img"))
  .then(v => console.log(v))
  .catch(e => console.log(e))
<script src="https://unpkg.com/is-image-loaded-async"></script>
<script type="text/javascript">
  window.isImageLoadedAsync(document.querySelector("img"))
</script>

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100