Not quite.

```javascript
var xhr;

if( msie <= 8 && lowercase(method) === 'patch' )
{
   xhr = new ActiveXObject('Microsoft.XMLHTTP');
} else {
  try {
    xhr = new window.XMLHttpRequest();
  } catch( e ) {
    xhr = new ActiveXObject('Microsoft.XMLHTTP');
  }
}
return xhr;
```