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); } }); }