Problem:
- I am looking for a way to intercept xhr.open() calls
- I am writing a framework which will run along side exiting code, over which i have no control
- I need to intercept the open calls in this existing code.
- I cannot change the existing code
- I must thus override the native XHR implementation for both IE and Firefox.
I have made the following progress: http://dogself.com/telluriumTest/scripts/xhrhook.js
the above hook works in firefox, but does not bind onreadystatechange properly in IE, so the request is made, but the onreadystatechange callback never executes correctly.
Can you give me any new ideas on how to approach this problem?