add: window.editorShell.editorDocument.title = title;  
context: function SetEditMode(mode){  if (gIsHTMLEditor)  {    var bodyNode = editorShell.editorDocument.getElementsByTagName("body").item(0);    if (!bodyNode)    {      dump("SetEditMode: We don't have a body node!\n");      return;    }    // Switch the UI mode before inserting contents    //   so user can't type in source window while new window is being filled    var previousMode = gEditorDisplayMode;    if (!SetDisplayMode(mode))      return;    var source;    if (mode == DisplayModeSource)    {      // Get the entire document's source string      var flags = gOutputEncodeEntities;      //       var prettyPrint = gPrefs.GetBoolPref("editor.prettyprint");      if (prettyPrint)        flags |= gOutputFormatted;      source = editorShell.GetContentsAs("text/html", flags);      var start = source.search(/<html/i);      if (start == -1) start = 0;      gSourceContentWindow.value = source.slice(start);      gSourceContentWindow.focus();    }    else if (previousMode == DisplayModeSource)     {      // We are comming from edit source mode,      //   so transfer that back into the document      source = gSourceContentWindow.value;      editorShell.RebuildDocumentFromSource(source);      // Must handle <title> here to make sure new value is updated      //  everwhere (also covers bug in RebuildDocumentFromSource that strips it out!)      var titleStart = source.search(/<title>/i);      if (titleStart != -1)      {        // Skip over tag name        titleStart += 7;        var titleEnd = source.indexOf("<",titleStart);        if (titleEnd > titleStart)        {          var title = source.slice(titleStart, titleEnd);          editorShell.SetDocumentTitle(title);        }      }      // Clear out the string buffers      source = null;      gSourceContentWindow.value = null;      // reset selection to top of doc (wish we could preserve it!)      if (bodyNode)        editorShell.editorSelection.collapse(bodyNode, 0);      window._content.focus();    }  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/178cdf8e86479d62463ce7e9ac8b636ad2daa3f1/editor.js/clean/editor/ui/composer/content/editor.js