Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(@Inject(DOCUMENT) document: any, ngZone: NgZone, @Optional() xhrFactory: XhrFactory) {
domAdapter.inject({
_document: document,
listen: function(...args) {
const eventName = args[1];
if (outsideZoneEvents.indexOf(eventName) !== -1) {
return ngZone.runOutsideAngular(() => {
return this.callBase.apply(this, args);
});
}
if (ngZone.isStable && insideZoneEvents.indexOf(eventName) !== -1) {
return ngZone.run(() => {
return this.callBase.apply(this, args);
});
}