Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 921 Bytes

backgroundImageLoaded.md

File metadata and controls

20 lines (15 loc) · 921 Bytes

backgroundImageLoaded

Detect when a background image has been loaded on an HTMLElement

Parameters

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

Example

	import backgroundImageLoaded from 'coffeekraken-sugar/js/dom/backgroundImageLoaded'
backgroundImageLoaded($myElm).then(() => {
  // do something when loaded
})

Author : Olivier Bossel [email protected] https://olivierbossel.com