mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1155898 - Use fetch instead of XHR for IdP. r=jib
This commit is contained in:
parent
23c9fa9162
commit
f0aa6a94a7
@ -207,7 +207,7 @@ IdpSandbox.prototype = {
|
||||
wantGlobalProperties: [
|
||||
'indexedDB', 'XMLHttpRequest', 'TextEncoder', 'TextDecoder',
|
||||
'URL', 'URLSearchParams', 'atob', 'btoa', 'Blob', 'crypto',
|
||||
'rtcIdentityProvider'
|
||||
'rtcIdentityProvider', 'fetch'
|
||||
]
|
||||
});
|
||||
let registrar = this.sandbox.rtcIdentityProvider;
|
||||
|
@ -21,12 +21,8 @@
|
||||
|
||||
IDPJS.prototype = {
|
||||
getLogin: function() {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'https://example.com/.well-known/idp-proxy/idp.sjs?' + this.id);
|
||||
return new Promise(resolve => {
|
||||
xhr.onload = e => resolve(xhr.status === 200);
|
||||
xhr.send();
|
||||
});
|
||||
return fetch('https://example.com/.well-known/idp-proxy/idp.sjs?' + this.id)
|
||||
.then(response => response.status === 200);
|
||||
},
|
||||
checkLogin: function(result) {
|
||||
return this.getLogin()
|
||||
|
Loading…
Reference in New Issue
Block a user