offlineStrings = document.getElementById('offlineStrings');
JSAN.use('util.error'); this.error = new util.error();
JSAN.use('util.window'); this.window = new util.window();
+ JSAN.use('util.sound'); this.sound = new util.sound();
this.w = window;
var x = document.getElementById('network_progress');
if (e) { e.setAttribute('label',text); }
};
content_params.chrome_xulG = xulG;
+ content_params._sound = xulG._sound;
if (params && params.tab_name) content_params.set_tab_name( params.tab_name );
var frame;
util.sound = function () {
try {
+
+ /* We're going to turn this guy into a singleton, at least for a given window, and look for it in xulG */
+ if (! window.xulG) { window.xulG = {}; }
+ if (window.xulG._sound) { return window.xulG._sound; }
+
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var SOUNDContractID = "@mozilla.org/sound;1";
var SOUNDIID = Components.interfaces.nsISound;
this.SOUND = Components.classes[SOUNDContractID].createInstance(SOUNDIID);
this.SOUND.init(); // not necessary, but helps avoid delays?
+ window.xulG._sound = this;
+ return this;
+
} catch(E) {
- dump('util.sound constructor: ' + E + '\n');
+ dump('error in util.sound constructor: ' + E + '\n');
+ return this;
}
-
- return this;
};
util.sound.prototype = {