Created
March 2, 2020 14:27
-
-
Save YonatanKra/936053e21fd63f0d6d95c5cb46cb3aff 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
function retry() { | |
try { | |
console.log(window.toBe.orNotToBe); | |
} catch(e) { | |
setTimeout(retry, 250); | |
} | |
} | |
retry(); | |
// simulate a fetch action from the server | |
setTimeout(() => { | |
window.toBe = {orNotToBe: "That is the question!"} | |
}, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment