<commit_before>/** section: wysihat
 * WysiHat.iFrame
 *  includes WysiHat.Commands, WysiHat.Persistence, WysiHat.Window, WysiHat.iFrame.Methods
**/
WysiHat.iFrame = {
  create: function(textarea, callback) {
    var editArea = new Element('iframe', { 'id': textarea.id + '_editor', 'class': 'editor' });

    WysiHat.Editor.extend(editArea);
    Object.extend(editArea, WysiHat.iFrame.Methods);

    editArea.attach(textarea, callback);
    textarea.insert({before: editArea});

    return editArea;
  }
};

/** section: wysihat
 *  mixin WysiHat.iFrame.Methods
**/
WysiHat.iFrame.Methods = {
  attach: function(element, callback) {
    this.textarea = element;

    // Use onload because iframes are not always immediately accessible
    this.observe('load', function() {
      try {
        var document = this.getDocument();
      } catch(e) { return; } // No iframe, just stop

      this.selection = new WysiHat.Selection(this);

      // If designMode is still off let this function continue because the
      // iframe may still may be immutable on the first run
      if (this.ready && document.designMode == 'on')
        return;
<commit_msg>Included modules extend editor after WysiHat.iFrame.Methods<commit_after>/** section: wysihat
 * WysiHat.iFrame
 *  includes WysiHat.Commands, WysiHat.Persistence, WysiHat.Window, WysiHat.iFrame.Methods
**/
WysiHat.iFrame = {
  create: function(textarea, callback) {
    var editArea = new Element('iframe', { 'id': textarea.id + '_editor', 'class': 'editor' });

    Object.extend(editArea, WysiHat.iFrame.Methods);
    WysiHat.Editor.extend(editArea);

    editArea.attach(textarea, callback);
    textarea.insert({before: editArea});

    return editArea;
  }
};

/** section: wysihat
 *  mixin WysiHat.iFrame.Methods
**/
WysiHat.iFrame.Methods = {
  attach: function(element, callback) {
    this.textarea = element;

    // Use onload because iframes are not always immediately accessible
    this.observe('load', function() {
      try {
        var document = this.getDocument();
      } catch(e) { return; } // No iframe, just stop

      this.selection = new WysiHat.Selection(this);

      // If designMode is still off let this function continue because the
      // iframe may still may be immutable on the first run
      if (this.ready && document.designMode == 'on')
        return;

{'fraction_non_alphanumeric': 0.12595744680851065, 'fraction_numerical': 0.0, 'mean_word_length': 3.337638376383764, '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': '7561821', 'n_tokens_mistral': 784, 'n_tokens_neox': 763, 'n_words': 187}