Created
November 15, 2018 11:42
-
-
Save MirceaUngureanu/6ba9ffa3334f167ed5c9370a14ac8040 to your computer and use it in GitHub Desktop.
Add custom functionality to stock XMLHttpRequest.prototype.send or use as a vanilla JS alternative to jQuery ajaxSend()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(originalSend){ | |
XMLHttpRequest.prototype.send = function (data) { | |
// your custom code here | |
originalSend.call(this, data); | |
}; | |
})(XMLHttpRequest.prototype.send); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment