Created
July 11, 2022 14:47
-
-
Save e-oz/7f7956e29b183cad29f7bfd0deaeade7 to your computer and use it in GitHub Desktop.
zone-flags.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable @typescript-eslint/no-explicit-any */ | |
// | |
// https://angular.io/guide/zone#setting-up-zonejs | |
// https://github.com/angular/angular/blob/master/packages/zone.js/lib/zone.configurations.api.ts | |
// | |
(window as any).__Zone_disable_defineProperty = true; | |
(window as any).__Zone_disable_requestAnimationFrame = true; | |
(window as any).__Zone_disable_on_property = true; | |
(window as any).__zone_symbol__UNPATCHED_EVENTS = [ | |
'blur', 'focus', | |
'drag', 'dragend', 'dragenter', 'dragleave', 'dragover', 'dragstart', | |
'durationchange', | |
'emptied', | |
'mouseenter', // needed for mat-tooltip (if no zone-rxjs patch) | |
'mouseleave', // needed for mat-tooltip (if no zone-rxjs patch) | |
'mouseout', | |
'mousemove', // needed for mat-slider (if no zone-rxjs patch) | |
'mouseover', | |
'scroll', | |
'mousewheel', | |
'ratechange', 'timeupdate', 'waiting', 'touchmove', | |
'mozpointerlockchange', 'mozpointerlockerror' | |
]; | |
(window as any).__Zone_disable_EventEmitter = true; | |
(window as any).__Zone_disable_nextTick = true; | |
(window as any).__Zone_disable_fs = true; | |
(window as any).__Zone_disable_node_timers = true; | |
(window as any).__Zone_disable_crypto = true; | |
(window as any).__Zone_disable_blocking = true; | |
// (window as any).__Zone_disable_EventTarget = true; | |
(window as any).__Zone_disable_FileReader = true; | |
(window as any).__Zone_disable_MutationObserver = true; | |
(window as any).__Zone_disable_IntersectionObserver = true; | |
(window as any).__Zone_disable_customElements = true; | |
(window as any).__Zone_disable_XHR = true; | |
(window as any).__Zone_disable_geolocation = true; | |
(window as any).__Zone_disable_canvas = true; | |
try { | |
if (window?.location?.hostname !== 'localhost') { | |
(window as any).__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = true; | |
(window as any).__zone_symbol__ignoreConsoleErrorUncaughtError = true; | |
} | |
} catch (e) { | |
console.error(e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment