Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 788 Bytes

scriptLoaded.md

File metadata and controls

20 lines (15 loc) · 788 Bytes

loadScript

Detect when a script has been fully loaded

Parameters

Name Type Description Status Default
$script { HTMLScriptElement } The script element to detect the loading state required

Return { Promise } The promise that will be resolved when the script is fully loaded

Example

	import scriptLoaded from 'coffeekraken-sugar/js/dom/scriptLoaded'
scriptLoaded($script).then(($script) => {
  // do something here
})

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