shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
whenImageLoaded
Type:Function
Status:stable
Since:1.0.0
Platform:js
@blackbyte.sugar.js.dom.when
Wait until the passed image is fully loaded
Params
- $img*-HTMLImageElement
The image to check the loading state
Return
- -SPromise
The promise that will be resolved when all the images are correctly loaded
Example
import { whenImageLoaded } from '@blackbyte/sugar/dom'
whenImageLoaded($myCoolHTMLImageElement).then(($img) => {
// do something when the image is loaded
});Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space