Answer the question
In order to leave comments, you need to log in
Event when someone else's ajax has completed, jQuery?
Please give me an idea how you can find out when someone else's ajax has completed its work and added content to the site. 2 hours of searching on the Internet without result, tried all events. Example:
My userscript or iframe script binds #contentна
to append
.
Someone else 's script, when I press a key, sends a request and append
-dit content to the tag #content
.
Checking for the presence of a selector in a loop with a timer is an outdated idea.
Answer the question
In order to leave comments, you need to log in
onreadystatechange (only it may not work in all browsers), not the one related to Ajax, but this one: www.developphp.com/view_lesson.php?v=867
developer.mozilla.org/en-US/docs/Web /Reference/Events/readystatechange
You most likely need a MutationObserver (browser events when the DOM changes). For example CornerJS .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question