Last active
October 16, 2016 22:03
-
-
Save EeroHeroHeino/d32ea306a9be2a77537f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fn = function waitLoop() { | |
// picture is loaded if it has width | |
var width = document.querySelector("img[src='./theme/images/logos/hostedatisc.png']").naturalWidth; | |
if (typeof width != "undefined" && width > 0) { | |
callback(true); | |
} else { | |
setTimeout(waitLoop, 1000); | |
} | |
} | |
fn(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment