I am trying to override the XMLHttpRequest.protype.open method in Firefox's WebExtension. I have written a following code in content script
var oldOpen = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function (method, url, async, user, pass) {
console.log("url :"+url+"\n method: "+method);
oldOpen.apply(this,arguments);
};
But this code is not working. If anyone know that how to override the XMLHttpRequest.prototype.open method then please let me know.