How can I catch all ajax requests in javascript ?

Posted by Annan on Stack Overflow See other posts from Stack Overflow or by Annan
Published on 2010-05-02T20:21:26Z Indexed on 2010/05/02 20:27 UTC
Read the original article Hit count: 292

Filed under:
|
|

Is it possible to have a global event handler for ajax requests that automatically gets called when any ajax request returns ?

I'm interested in this because I'm making a greasemonkey script for an ajax site. In previous scripts I either ran the main function every few seconds or overwrote parts of the site's javascript, both things that are messy.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about greasemonkey