Detect when a background image has been loaded on an HTMLElement
Name | Type | Description | Status | Default |
---|---|---|---|---|
$elm | { HTMLElement } | The HTMLElement on which to detect the background image load | required |
Return { Promise } A promise that will be resolved when the background image has been loaded
import backgroundImageLoaded from 'coffeekraken-sugar/js/dom/backgroundImageLoaded'
backgroundImageLoaded($myElm).then(() => {
// do something when loaded
})
Author : Olivier Bossel [email protected] https://olivierbossel.com