Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(xhrFactory: XhrFactory) {
httpRequest.inject({
getXhr: function() {
let _xhr = xhrFactory.build();
if (!('withCredentials' in _xhr)) {
_xhr['withCredentials'] = false;
}
return _xhr;
}
});
}
}
},
isElementNode: function(element) {
return element && element.nodeType === 1;
},
isTextNode: function(element) {
return element && element.nodeType === 3;
},
isDocument: function(element) {
return element && element.nodeType === 9;
}
});
httpRequest.inject({
getXhr: function() {
if (!xhrFactory) {
return this.callBase.apply(this);
}
let _xhr = xhrFactory.build();
if (!('withCredentials' in _xhr)) {
_xhr['withCredentials'] = false;
}
return _xhr;
}
});
ngZone.run(() => {
eventsEngine.set({});
callbacks.forEach(callback => originalAdd.call(null, callback));