mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 687332: Fix OpenWebApps. r=fabrice
This commit is contained in:
parent
11bb6bb4f1
commit
69ee188cf8
@ -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