|
@ -10,7 +10,7 @@ var bgProcess; |
|
|
function startup(data, reason) { |
|
|
function startup(data, reason) { |
|
|
bgProcess = function(ev) { |
|
|
bgProcess = function(ev) { |
|
|
if (ev) { |
|
|
if (ev) { |
|
|
this.removeEventListener('load', bgProcess); |
|
|
|
|
|
|
|
|
this.removeEventListener(ev.type, bgProcess); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bgProcess = Services.appShell.hiddenDOMWindow.document; |
|
|
bgProcess = Services.appShell.hiddenDOMWindow.document; |
|
@ -22,9 +22,9 @@ function startup(data, reason) { |
|
|
|
|
|
|
|
|
if (reason === APP_STARTUP) { |
|
|
if (reason === APP_STARTUP) { |
|
|
Services.ww.registerNotification({ |
|
|
Services.ww.registerNotification({ |
|
|
observe: function(subject) { |
|
|
|
|
|
|
|
|
observe: function(win) { |
|
|
Services.ww.unregisterNotification(this); |
|
|
Services.ww.unregisterNotification(this); |
|
|
subject.addEventListener('load', bgProcess); |
|
|
|
|
|
|
|
|
win.addEventListener('DOMContentLoaded', bgProcess); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|