mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 687332: Fix OpenWebApps. r=fabrice
This commit is contained in:
parent
29337fc0ec
commit
3a94d21f88
@ -166,7 +166,7 @@ OpenWebapps.prototype = {
|
||||
let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest);
|
||||
xhr.open("GET", aURL, true);
|
||||
|
||||
xhr.onload = function() {
|
||||
xhr.addEventListener("load", function() {
|
||||
if (xhr.status == 200) {
|
||||
try {
|
||||
let manifest = JSON.parse(xhr.responseText);
|
||||
@ -185,12 +185,12 @@ OpenWebapps.prototype = {
|
||||
else if (aError) {
|
||||
aError.handle({ code: "networkError", message: "Unable to retrieve manifest" });
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
|
||||
xhr.onerror = function() {
|
||||
xhr.addEventListener("error", function() {
|
||||
if (aError)
|
||||
aError.handle({ code: "networkError", message: "Unable to retrieve manifest" });
|
||||
}
|
||||
}, false);
|
||||
|
||||
xhr.send(null);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user