These methods that come to mind, what are the pros and cons of each?
Method 1: Augment native instance
var _XMLHttpRequest = XMLHttpRequest;
XMLHttpR
Depending on the JS engine, method 1 produces considerable overhead, since xhr.open is redefined whenever XHR is instantiated.
Method 2 makes me think "why would you need the new _XMLHttpRequest in the first place"? There's a minor feeling of undesired side effects, but it appears to work just fine.
Method 3: simple, old-school, but it won't work straight-away. (Think about reading properties)
In general, I'm personally reluctant when it comes to overwriting browser objects, so that would be a big con to all three methods. Better use some other variable like ProxyXHR (just my 2 cents)