add:  headNode = editorShell.editorDocument.getElementsByTagName("head").item(0); if (!headNode) window.close(); 
context: function Startup(){  if (!InitEditorShell())    return;  dialog = new Object;  if (!dialog)  {    dump("Failed to create dialog object!!!\n");    window.close();  }  dialog.PageLocation     = document.getElementById("PageLocation");  dialog.PageModDate      = document.getElementById("PageModDate");  dialog.TitleInput       = document.getElementById("TitleInput");  dialog.AuthorInput      = document.getElementById("AuthorInput");  dialog.DescriptionInput = document.getElementById("DescriptionInput");  dialog.MoreSection      = document.getElementById("MoreSection");  dialog.MoreFewerButton  = document.getElementById("MoreFewerButton");  doSetOKCancel(onOK, null);    // Default string for new page is set from DTD string in XUL,  //   so set only if not new doc URL  var location = editorShell.editorDocument.location;  if (location != "about:blank")    dialog.PageLocation.setAttribute("value", editorShell.editorDocument.location);  authorElement = GetMetaElement("author");  if (!authorElement)  {    authorElement = CreateMetaElement("author");    if (!authorElement)      window.close();    insertNewAuthor = true;  }  descriptionElement = GetMetaElement("description");  if (!descriptionElement)  {    descriptionElement = CreateMetaElement("description");    if (!descriptionElement)      window.close();    insertNewDescription = true;  }  InitMoreFewer();  InitDialog();  dialog.TitleInput.focus();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/0b1fa1f02b84a5a78eb6d94ca7f0c64e3298758c/EdPageProps.js/buggy/editor/ui/dialogs/content/EdPageProps.js