forked from JeromeDane/Script-Handler
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels