Created
May 27, 2021 05:34
-
-
Save Postnov/87ba36752a339fc81416c7daf541c5d1 to your computer and use it in GitHub Desktop.
Проверка элементов без SetTimeout (check element without setTimout)
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 interval = setInterval(() => { | |
var element = document.querySelector('.test'); | |
if (element != null) { | |
clearInterval(interval); | |
console.log(element); | |
} | |
}, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment