rem: GetCurrentEditorElement().docShell.appType = 
add: var ds = GetCurrentEditorElement().docShell; var root = ds.QueryInterface(Components.interfaces.nsIDocShellTreeItem). rootTreeItem.QueryInterface(Components.interfaces.nsIDocShell);  root.QueryInterface(Components.interfaces.nsIDocShell).appType = 
context: function EditorStartup(){  GetCurrentEditorElement().docShell.appType =    Components.interfaces.nsIDocShell.APP_TYPE_EDITOR;  var is_HTMLEditor = IsHTMLEditor();  if (is_HTMLEditor)  {    // XUL elements we use when switching from normal editor to edit source    gContentWindowDeck = document.getElementById("ContentWindowDeck");    gFormatToolbar = document.getElementById("FormatToolbar");    gViewFormatToolbar = document.getElementById("viewFormatToolbar");  }  // set up our global prefs object  GetPrefsService();  // Startup also used by other editor users, such as Message Composer  EditorSharedStartup();  // Commands specific to the Composer Application window,  //  (i.e., not embedded editors)  //  such as file-related commands, HTML Source editing, Edit Modes...  SetupComposerWindowCommands();  ShowHideToolbarButtons();  AddToolbarPrefListener();  gCSSPrefListener = new nsButtonPrefListener();  // hide Highlight button if we are in an HTML editor with CSS mode off  var cmd = document.getElementById("cmd_highlight");  if (cmd) {    var prefs = GetPrefs();    var useCSS = prefs.getBoolPref("editor.use_css");    if (!useCSS && is_HTMLEditor) {      cmd.collapsed = true;    }  }  // Get url for editor content and load it.  // the editor gets instantiated by the edittingSession when the URL has finished loading.  var url = document.getElementById("args").getAttribute("value");  try {    var charset = document.getElementById("args").getAttribute("charset");    var contentViewer = GetCurrentEditorElement().docShell.contentViewer;    contentViewer.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);    contentViewer.defaultCharacterSet = charset;    contentViewer.forceCharacterSet = charset;  } catch (e) {}  EditorLoadUrl(url);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/41b441f124663e05d3d5e146d09a6168ab92d002/editor.js/clean/editor/ui/composer/content/editor.js