Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #25097 from julienw/1082064-prevent-double-domcont…
Browse files Browse the repository at this point in the history
…entloaded

Bug 1082064 - [Messages] Prevent double DOMContentLoaded events r=schung
  • Loading branch information
julienw committed Oct 16, 2014
2 parents dbf0f26 + 5fedbd6 commit abef62c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/sms/js/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ var Startup = {
},

init: function() {
window.addEventListener('DOMContentLoaded', function() {
var loaded = function() {
window.removeEventListener('DOMContentLoaded', loaded);
window.dispatchEvent(new CustomEvent('moz-chrome-dom-loaded'));

MessageManager.init();
Expand All @@ -89,7 +90,9 @@ var Startup = {
// dispatch chrome-interactive when thread list related modules
// initialized
window.dispatchEvent(new CustomEvent('moz-chrome-interactive'));
}.bind(this));
}.bind(this);

window.addEventListener('DOMContentLoaded', loaded);
}
};

Expand Down

0 comments on commit abef62c

Please sign in to comment.