Skip to content

Instantly share code, notes, and snippets.

@bmatusiak
Created February 15, 2024 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmatusiak/26e0c9f379a3a4c49c8cf3ef50c36092 to your computer and use it in GitHub Desktop.
Save bmatusiak/26e0c9f379a3a4c49c8cf3ef50c36092 to your computer and use it in GitHub Desktop.
function emptyLoad(target){
function lookup(){
if (ready) ready = false;
target.once((data) => {
if (data) {
clearInterval(checkInterval);
}else{
ready = true;
lookup()
}
})
}
var ready = true;
var checkInterval = setInterval(lookup, 2000);
lookup();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment