Skip to content

Instantly share code, notes, and snippets.

@Postnov
Created May 27, 2021 05:34
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 Postnov/87ba36752a339fc81416c7daf541c5d1 to your computer and use it in GitHub Desktop.
Save Postnov/87ba36752a339fc81416c7daf541c5d1 to your computer and use it in GitHub Desktop.
Проверка элементов без SetTimeout (check element without setTimout)
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