Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setTimeout() / setInterval() don't seem to be working #3

Open
tao-oat opened this issue May 5, 2022 · 0 comments
Open

setTimeout() / setInterval() don't seem to be working #3

tao-oat opened this issue May 5, 2022 · 0 comments

Comments

@tao-oat
Copy link

tao-oat commented May 5, 2022

Hello,
I'm trying to run a script on a page that loads dynamically(?), so I have to wait quite a while for the element I want to be present.
Using setTimeout() or setInterval() has no effect whatsoever, as the script action runs instantly, regardless of the value I put in the timeout:
setTimeout(remove_elements('._3z9_h'), 5000);
or
setInterval(remove_elements('._3z9_h'), 5000);

Using the "load" event seems to delay it a bit, but it's not enough, as the page is only halfway through when it runs:
window.addEventListener('load', remove_elements('._3z9_h'));

Is it a bug or am I doing something wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant