Warning in zone-evergreen.js from Chrome
See original GitHub issue[Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
(anonymous) @ zone-evergreen.js:2967
Looks like the code it is referring to is this:
const openNative = patchMethod(XMLHttpRequestPrototype, 'open', () => function (self, args) {
self[XHR_SYNC] = args[2] == false;
self[XHR_URL] = args[1];
return openNative.apply(self, args);
});
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
zone.js violation warnings on console in Angular project only ...
Consider marking event handler as 'passive' to make the page more responsive. The weird thing is that warning appear on Chrome only. (my...
Read more >Activate JavaScript in your browser - Google AdSense Help
Activate JavaScript in Google Chrome. Open Chrome on your computer. Click More and then Settings. Click Security and Privacy. Click Site settings.
Read more >Browser support - Angular
Chrome, latest ; Firefox, latest and extended support release (ESR) ; Edge, 2 most recent major versions ; Safari, 2 most recent major...
Read more >[Violation] 'setTimeout' handler took 85ms | auto optimize JS ...
i believe is jquery when we block him with autoptimize. and all the cache together will show the real execution time of jquery...
Read more >10 Things Every Angular Developer Should Know About Zone.js
Angular introduced Zone.js to handle change detection. This allows Angular to decide when the UI has to be refreshed.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry for the late response - it happens every time when using karma-jasmine.
https://github.com/fr0/angular-test/tree/zone
Run
npm install
thennpm test
This is not a zone.js issue, the warning is from here. https://github.com/evanw/node-source-map-support/blob/50642d69b1ba461beb651bbf4f6e52fbddaa5318/source-map-support.js#L96
The source map support library will open a
sync
xhr, so the warning will be displayed. will close this issue.