<commit_before>/* This Source Code Form is subject to the terms of the MIT license
 * If a copy of the MIT license was not distributed with this file, you can
 * obtain one at https://raw.github.com/mozilla/butter/master/LICENSE */

/**
 * Module: Editor
 */
define( [ "util/lang", "util/xhr",
          "./base-editor", "./trackevent-editor" ],
  function( LangUtils, XHRUtils,
            BaseEditor, TrackEventEditor ) {

  var __editors = {};

  function DeferredLayout( src ) {

    this.load = function( baseDir, readyCallback ) {
      baseDir = baseDir || "";
      if ( src.indexOf( "{{baseDir}}" ) > -1 ) {
        src = src.replace( "{{baseDir}}", baseDir );
      }

      XHRUtils.get( src, function( e ) {
        if ( e.target.readyState === 4 ){
          readyCallback( e.target.responseText );
        }
      }, "text/plain" );
    };
 }<commit_msg>Bug #3441 - Convert editor/editor to use xhr2<commit_after>/* This Source Code Form is subject to the terms of the MIT license
 * If a copy of the MIT license was not distributed with this file, you can
 * obtain one at https://raw.github.com/mozilla/butter/master/LICENSE */

/**
 * Module: Editor
 */
define( [ "util/lang", "util/xhr2",
          "./base-editor", "./trackevent-editor" ],
  function( LangUtils, xhr,
            BaseEditor, TrackEventEditor ) {

  var __editors = {};

  function DeferredLayout( src ) {

    this.load = function( baseDir, readyCallback ) {
      baseDir = baseDir || "";
      if ( src.indexOf( "{{baseDir}}" ) > -1 ) {
        src = src.replace( "{{baseDir}}", baseDir );
      }

      xhr.get( src, readyCallback );
    };
 }
{'fraction_non_alphanumeric': 0.14880587875076545, 'fraction_numerical': 0.005511328842620943, 'mean_word_length': 2.536796536796537, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '4863609', 'n_tokens_mistral': 514, 'n_tokens_neox': 501, 'n_words': 147}