Guest User

handler

a guest
Aug 28th, 2015
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function(open, send) {
  2.  
  3.     XMLHttpRequest.prototype.open = function(method, url, async, user, pass) {
  4.  
  5.         this.addEventListener("readystatechange", function() {
  6.             if(this.readyState === 4 {
  7.                
  8.               // code
  9.                
  10.                
  11.             }
  12.         }, false);
  13.  
  14.         open.call(this, method, url, async, user, pass);
  15.     };
  16.  
  17.     XMLHttpRequest.prototype.send = function(params) {
  18.        
  19.         send.call(this, params);
  20.     }
  21.  
  22. })(XMLHttpRequest.prototype.open, XMLHttpRequest.prototype.send);
Advertisement
Add Comment
Please, Sign In to add comment