Official Go implementation of the Ethereum protocol
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
go-ethereum/lib/browser_fix/xhr.js

35 lines
553 B

/**
* Module dependencies.
*/
var global = (function() { return this; })(); // jshint ignore:line
/**
* XMLHttpRequest constructor.
*/
var XMLHttpRequest = window.XMLHttpRequest; // jshint ignore:line
/**
* Module exports.
*/
module.exports.XMLHttpRequest = XMLHttpRequest ? xhr : null;
/**
* XMLHttpRequest constructor.
*
* @param {Object) opts (optional)
* @api public
*/
function xhr(obj) {
var instance;
instance = new XMLHttpRequest(obj);
return instance;
}
if (XMLHttpRequest) xhr.prototype = XMLHttpRequest.prototype;