How to checkif there are pending requests (Ajax and its variants) from browser

前端 未结 4 2004
感动是毒
感动是毒 2020-12-28 16:20

Some of the sites I deal with have heavy ajax requests. I plan to wait for Ajax request completion before clicking for asserting for element. Currently I use



        
4条回答
  •  春和景丽
    2020-12-28 16:53

    This doesn't work? http://api.jquery.com/ajaxstop/

    $(document).ajaxStop(function() {
        // Do stuff here...    
    });
    

提交回复
热议问题