code: function SetScriptSource(script, new_source, preview_only, change_log) {
      var old_source = script.source;
      var diff = CompareStrings(old_source, new_source);
      return ApplyPatchMultiChunk(script, diff, new_source, preview_only,
          change_log);
    }
docs: LiveEdit main entry point: changes a script text to a new string.