whenLinkLoaded

Type:Function
Status:stable
Since:1.0.0
Platform:js
@blackbyte.sugar.js.dom.when

Wait until the passed HTMLLinkElement is fully loaded

Params

  1. $link*-HTMLLinkElement

    The link tag to check the loading state

Return

  1. -Promise

    The promise that will be resolved

Example

import { whenLinkLoaded } from '@blackbyte/sugar/dom'
whenLinkLoaded($myCoolHTMLLinlElement).then($link => {
  // do something when the link is loaded
});

Todo

  • testsnormal