const Ci = Components.interfaces; const Cc = Components.classes; const Cr = Components.results; var qaTools = { // load a JSON doc into a menulist/menupopup // takes the url to load, the menulist to populate, the name of the method // to use to get the name from the JSON doc, and the name of the method to // use to get the value from the JSON doc, plus an optional callback loadJsonMenu : function(url, menulist, nameMethod, valueMethod, callback) { var d = loadJSONDoc(url); d.addErrback(function (err) { if (err instanceof CancelledError) { return; } alert(err); }); d.addCallback(function(obj) { if (obj instanceof Array) { for (var i=0; i