From 29d2cdc01522436ba5a925c126b268727c344f2f Mon Sep 17 00:00:00 2001 From: Deathamns Date: Tue, 16 Dec 2014 18:09:55 +0100 Subject: [PATCH] Firefox: initialize buttons when DOM is ready --- platform/firefox/bootstrap.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/firefox/bootstrap.js b/platform/firefox/bootstrap.js index 9cac534..2dbd429 100644 --- a/platform/firefox/bootstrap.js +++ b/platform/firefox/bootstrap.js @@ -10,7 +10,7 @@ var bgProcess; function startup(data, reason) { bgProcess = function(ev) { if (ev) { - this.removeEventListener('load', bgProcess); + this.removeEventListener(ev.type, bgProcess); } bgProcess = Services.appShell.hiddenDOMWindow.document; @@ -22,9 +22,9 @@ function startup(data, reason) { if (reason === APP_STARTUP) { Services.ww.registerNotification({ - observe: function(subject) { + observe: function(win) { Services.ww.unregisterNotification(this); - subject.addEventListener('load', bgProcess); + win.addEventListener('DOMContentLoaded', bgProcess); } }); }