This is partly a request for a workaround, and partly an attempt to get a message stating that the prototype implementation of Internet Explorer is still malfunctioning.
The following code does not work in Internet Explorer.
XMLHttpRequest.prototype.old = XMLHttpRequest.prototype.open;
var x = new XMLHttpRequest();
x.old("POST", "test", false);
For IE 8 beta and all previous versions, the XMLHttpRequest.prototype property never existed in the first place. In IE8, it exists, but you get the error message "Invalid procedure call or argument". Internet Explorer does not like design.
Does anyone know of a workaround for this?
Update
It has been pointed out that I can override the whole XMLHttpRequest with a new function and constructor, and then create a wrapper script ala XMLHttpRequest.js. The prototype method is much shorter, so I would prefer to use it for browsers other than IE.
source
share