Skip to content

Commit

Permalink
Bundle release 2.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
eliamaino-fp committed Jan 23, 2019
1 parent 254e9ea commit c6dfb8a
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 56 deletions.
2 changes: 1 addition & 1 deletion dist/vast-client-module.min.js

Large diffs are not rendered by default.

53 changes: 26 additions & 27 deletions dist/vast-client-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -1142,11 +1142,11 @@ function parseCreativeAdIdAttribute(creativeElement) {
}

function xdr() {
var xdr = void 0;
var request = void 0;
if (window.XDomainRequest) {
xdr = new XDomainRequest();
request = new XDomainRequest();
}
return xdr;
return request;
}

function supported() {
Expand All @@ -1161,16 +1161,14 @@ function get$1(url, options, cb) {
} else {
return cb(new Error('FlashURLHandler: Microsoft.XMLDOM format not supported'));
}

var xdr = xdr();
xdr.open('GET', url);
xdr.timeout = options.timeout || 0;
xdr.withCredentials = options.withCredentials || false;
xdr.send();
xdr.onprogress = function () {};

xdr.onload = function () {
xmlDocument.loadXML(xdr.responseText);
request.open('GET', url);
request.timeout = options.timeout || 0;
request.withCredentials = options.withCredentials || false;
request.send();
request.onprogress = function () {};

request.onload = function () {
xmlDocument.loadXML(request.responseText);
cb(null, xmlDocument);
};
}
Expand Down Expand Up @@ -1237,10 +1235,10 @@ var nodeURLHandler = {

function xhr() {
try {
var _xhr = new window.XMLHttpRequest();
if ('withCredentials' in _xhr) {
var request = new window.XMLHttpRequest();
if ('withCredentials' in request) {
// check CORS support
return _xhr;
return request;
}
return null;
} catch (err) {
Expand All @@ -1259,21 +1257,22 @@ function get$3(url, options, cb) {
}

try {
var _xhr2 = _xhr2();
_xhr2.open('GET', url);
_xhr2.timeout = options.timeout || 0;
_xhr2.withCredentials = options.withCredentials || false;
_xhr2.overrideMimeType && _xhr2.overrideMimeType('text/xml');
_xhr2.onreadystatechange = function () {
if (_xhr2.readyState === 4) {
if (_xhr2.status === 200) {
cb(null, _xhr2.responseXML);
var request = xhr();

request.open('GET', url);
request.timeout = options.timeout || 0;
request.withCredentials = options.withCredentials || false;
request.overrideMimeType && request.overrideMimeType('text/xml');
request.onreadystatechange = function () {
if (request.readyState === 4) {
if (request.status === 200) {
cb(null, request.responseXML);
} else {
cb(new Error('XHRURLHandler: ' + _xhr2.statusText));
cb(new Error('XHRURLHandler: ' + request.statusText));
}
}
};
_xhr2.send();
request.send();
} catch (error) {
cb(new Error('XHRURLHandler: Unexpected error'));
}
Expand Down
2 changes: 1 addition & 1 deletion dist/vast-client-node.min.js

Large diffs are not rendered by default.

51 changes: 25 additions & 26 deletions dist/vast-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1611,11 +1611,11 @@ var VAST = (function (exports) {
}

function xdr() {
var xdr = void 0;
var request = void 0;
if (window.XDomainRequest) {
xdr = new XDomainRequest();
request = new XDomainRequest();
}
return xdr;
return request;
}

function supported() {
Expand All @@ -1630,16 +1630,14 @@ var VAST = (function (exports) {
} else {
return cb(new Error('FlashURLHandler: Microsoft.XMLDOM format not supported'));
}
request.open('GET', url);
request.timeout = options.timeout || 0;
request.withCredentials = options.withCredentials || false;
request.send();
request.onprogress = function () {};

var xdr = xdr();
xdr.open('GET', url);
xdr.timeout = options.timeout || 0;
xdr.withCredentials = options.withCredentials || false;
xdr.send();
xdr.onprogress = function () {};

xdr.onload = function () {
xmlDocument.loadXML(xdr.responseText);
request.onload = function () {
xmlDocument.loadXML(request.responseText);
cb(null, xmlDocument);
};
}
Expand All @@ -1662,10 +1660,10 @@ var VAST = (function (exports) {

function xhr() {
try {
var _xhr = new window.XMLHttpRequest();
if ('withCredentials' in _xhr) {
var request = new window.XMLHttpRequest();
if ('withCredentials' in request) {
// check CORS support
return _xhr;
return request;
}
return null;
} catch (err) {
Expand All @@ -1684,21 +1682,22 @@ var VAST = (function (exports) {
}

try {
var _xhr2 = _xhr2();
_xhr2.open('GET', url);
_xhr2.timeout = options.timeout || 0;
_xhr2.withCredentials = options.withCredentials || false;
_xhr2.overrideMimeType && _xhr2.overrideMimeType('text/xml');
_xhr2.onreadystatechange = function () {
if (_xhr2.readyState === 4) {
if (_xhr2.status === 200) {
cb(null, _xhr2.responseXML);
var request = xhr();

request.open('GET', url);
request.timeout = options.timeout || 0;
request.withCredentials = options.withCredentials || false;
request.overrideMimeType && request.overrideMimeType('text/xml');
request.onreadystatechange = function () {
if (request.readyState === 4) {
if (request.status === 200) {
cb(null, request.responseXML);
} else {
cb(new Error('XHRURLHandler: ' + _xhr2.statusText));
cb(new Error('XHRURLHandler: ' + request.statusText));
}
}
};
_xhr2.send();
request.send();
} catch (error) {
cb(new Error('XHRURLHandler: Unexpected error'));
}
Expand Down
2 changes: 1 addition & 1 deletion dist/vast-client.min.js

Large diffs are not rendered by default.

0 comments on commit c6dfb8a

Please sign in to comment.