Answer the question
In order to leave comments, you need to log in
How to catch ajax request?
The task is this, you need to get the id of the elements.
Elements are loaded when scrolling down, and at that moment an ajax request "ajax/leads/multiple/loadmore/" is made.
You need to somehow catch this request and, when it completes, call the "someFunc ()" function, which will collect all the elements.
(the someFunc() function should not be called often, because it contains a request to the api, which does not like requests very much), i.e. you need to precisely catch this request and no other.
There was an idea with MutationObserver, but it is called too often.
Who coped with such a task?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question