#109690Prevent Chrome XMLHttpRequest deprecation messages
Description
Chrome reports in the Backend when Build/Sources/TypeScript/backend/storage/persistent.ts is used:
> 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/.
WhatWG says:
> Synchronous XMLHttpRequest outside of workers is in the process of being removed from the web platform as it has detrimental effects to the end user’s experience. (This is a long process that takes many years.) Developers must not pass false for the async argument when the current global object is a Window object. User agents are strongly encouraged to warn about such usage in developer tools and may experiment with throwing an “InvalidAccessError” DOMException when it occurs.
The usage comes from the only Core place that sets `async=false`:
const request = new XMLHttpRequest();
const async = false;
request.open('GET', url.toString(), async);
request.send();
This means somehow™ we need to convert this in a working asynchronous call, ideally without breaking consumers
Reviews 1
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". The changes above were merged or abandoned: read them before you start. How to create a patch
- Commit message
-
[TASK] Prevent Chrome XMLHttpRequest deprecation messages Resolves: #109690 Releases: main