ent" }); } window.onload = gBrowserInit.onLoad.bind(gBrowserInit); window.onunload = gBrowserInit.onUnload.bind(gBrowserInit); window.onclose = WindowIsClosing; window.addEventListener( "MozBeforeInitialXULLayout", gBrowserInit.onBeforeInitialXULLayout.bind(gBrowserInit), { once: true } ); // The listener of DOMContentLoaded must be set on window, rather than // document, because the window can go away before the event is fired. // In that case, we don't want to initialize anything, otherwise we // may be leaking things because they will never be destroyed after. window.addEventListener( "DOMContentLoaded", gBrowserInit.onDOMContentLoaded.bind(gBrowserInit), { once: true } ); PK