<commit_before>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

(function (aGlobal) {

  var tbBug766495 = {
    init: function() {
      window.removeEventListener('load', this, false);
      window.addEventListener('unload', this, false);
      document.documentElement.addEventListener('compose-window-init', this, false);
      document.documentElement.addEventListener('compose-window-close', this, false);
    },
    destroy: function() {
      window.removeEventListener('unload', this, false);
      document.documentElement.removeEventListener('compose-window-init', this, false);
      document.documentElement.removeEventListener('compose-window-close', this, false);
    },
    activateComposeWindow: function() {
    },
    deactivateComposeWindow: function() {
    },

    handleEvent: function(aEvent) {
      switch (aEvent.type) {
      case 'load':
        this.init();
        return;

      case 'unload':
        this.destroy();
        return;

      case 'compose-window-init':
        this.activateComposeWindow();
        break;

      case 'compose-window-close':
        this.deactivateComposeWindow();
        break;
      }
    }
  };
  window.addEventListener('load', tbBug766495, false);
  aGlobal.tbBug766495 = tbBug766495;
})(this);<commit_msg>Use DOMContendLoaded event instead of load event to verify opening compose window definitely<commit_after>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

(function (aGlobal) {

  var tbBug766495 = {
    init: function() {
      window.removeEventListener('DOMContentLoaded', this, false);
      window.addEventListener('unload', this, false);
      document.documentElement.addEventListener('compose-window-init', this, false);
      document.documentElement.addEventListener('compose-window-close', this, false);
    },
    destroy: function() {
      window.removeEventListener('unload', this, false);
      document.documentElement.removeEventListener('compose-window-init', this, false);
      document.documentElement.removeEventListener('compose-window-close', this, false);
    },
    activateComposeWindow: function() {
    },
    deactivateComposeWindow: function() {
    },

    handleEvent: function(aEvent) {
      switch (aEvent.type) {
      case 'DOMContentLoaded':
        this.init();
        return;

      case 'unload':
        this.destroy();
        return;

      case 'compose-window-init':
        this.activateComposeWindow();
        break;

      case 'compose-window-close':
        this.deactivateComposeWindow();
        break;
      }
    }
  };
  window.addEventListener('DOMContentLoaded', tbBug766495, false);
  aGlobal.tbBug766495 = tbBug766495;
})(this);
{'fraction_non_alphanumeric': 0.124036205162588, 'fraction_numerical': 0.018773047267851155, 'mean_word_length': 3.1386962552011095, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1062415', 'n_tokens_mistral': 881, 'n_tokens_neox': 827, 'n_words': 199}