Merge pull request #14636 from Snuffleupagus/Driver-quit-fetch

Replace XMLHttpRequest usage with the Fetch API in `Driver._quit`
This commit is contained in:
Tim van der Meij 2022-03-06 18:26:55 +01:00 committed by GitHub
commit 3e593cfc1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -845,9 +845,9 @@ class Driver {
this.end.textContent = "Tests finished. Close this window!";
// Send the quit request
const r = new XMLHttpRequest();
r.open("POST", `/tellMeToQuit?browser=${escape(this.browser)}`, false);
r.send(null);
fetch(`/tellMeToQuit?browser=${escape(this.browser)}`, {
method: "POST",
});
}
_info(message) {