return NS_NewScriptHTMLOptGroupElement(aContext, aElement, aParent, aReturn);
if (mUseXBLForms) return NS_NewScriptHTMLElement(aContext, aElement, aParent, aReturn); else return NS_NewScriptHTMLOptGroupElement(aContext, aElement, aParent, aReturn);
nsDOMScriptObjectFactory::NewScriptElement(const nsString &aTagName,                                            nsIScriptContext *aContext,                                            nsISupports *aElement,                                            nsISupports *aParent,                                            void **aReturn){  char *str = aTagName.ToNewCString();  nsDOMHTMLTag tag = NS_DOMTagToEnum(str);  if (str) {    nsCRT::free(str);  }  switch (tag) {    case DOMHTMLTag_a:      return NS_NewScriptHTMLAnchorElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_applet:      return NS_NewScriptHTMLAppletElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_area:      return NS_NewScriptHTMLAreaElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_br:      return NS_NewScriptHTMLBRElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_base:      return NS_NewScriptHTMLBaseElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_basefont:      return NS_NewScriptHTMLBaseFontElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_body:      return NS_NewScriptHTMLBodyElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_button:      return NS_NewScriptHTMLButtonElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_dl:      return NS_NewScriptHTMLDListElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_dir:      return NS_NewScriptHTMLDirectoryElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_div:      return NS_NewScriptHTMLDivElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_font:      return NS_NewScriptHTMLFontElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_form:      return NS_NewScriptHTMLFormElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_frame:      return NS_NewScriptHTMLFrameElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_frameset:      return NS_NewScriptHTMLFrameSetElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_hr:      return NS_NewScriptHTMLHRElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_head:      return NS_NewScriptHTMLHeadElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_h1:    case DOMHTMLTag_h2:    case DOMHTMLTag_h3:    case DOMHTMLTag_h4:    case DOMHTMLTag_h5:    case DOMHTMLTag_h6:      return NS_NewScriptHTMLHeadingElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_html:      return NS_NewScriptHTMLHtmlElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_iframe:      return NS_NewScriptHTMLIFrameElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_img:      return NS_NewScriptHTMLImageElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_input:      return NS_NewScriptHTMLInputElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_isindex:      return NS_NewScriptHTMLIsIndexElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_li:      return NS_NewScriptHTMLLIElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_label:      return NS_NewScriptHTMLLabelElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_legend:      return NS_NewScriptHTMLLegendElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_link:      return NS_NewScriptHTMLLinkElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_map:      return NS_NewScriptHTMLMapElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_menu:      return NS_NewScriptHTMLMenuElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_meta:      return NS_NewScriptHTMLMetaElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_ins:    case DOMHTMLTag_del:      return NS_NewScriptHTMLModElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_ol:      return NS_NewScriptHTMLOListElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_object:      return NS_NewScriptHTMLObjectElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_embed:      return NS_NewScriptHTMLEmbedElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_optgroup:      return NS_NewScriptHTMLOptGroupElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_option:      return NS_NewScriptHTMLOptionElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_p:      return NS_NewScriptHTMLParagraphElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_param:      return NS_NewScriptHTMLParamElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_pre:      return NS_NewScriptHTMLPreElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_blockquote:    case DOMHTMLTag_q:      return NS_NewScriptHTMLQuoteElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_script:      return NS_NewScriptHTMLScriptElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_select:      return NS_NewScriptHTMLSelectElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_style:      return NS_NewScriptHTMLStyleElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_caption:      return NS_NewScriptHTMLTableCaptionElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_th:    case DOMHTMLTag_td:      return NS_NewScriptHTMLTableCellElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_col:    case DOMHTMLTag_colgroup:      return NS_NewScriptHTMLTableColElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_table:      return NS_NewScriptHTMLTableElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_tr:      return NS_NewScriptHTMLTableRowElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_thead:    case DOMHTMLTag_tbody:    case DOMHTMLTag_tfoot:      return NS_NewScriptHTMLTableSectionElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_textarea:      return NS_NewScriptHTMLTextAreaElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_title:      return NS_NewScriptHTMLTitleElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_ul:      return NS_NewScriptHTMLUListElement(aContext, aElement, aParent, aReturn);    case DOMHTMLTag_ilayer:    case DOMHTMLTag_layer:    case DOMHTMLTag_fieldset:    case DOMHTMLTag_multicol:    case DOMHTMLTag_spacer:    case DOMHTMLTag_wbr:      // XXX There should be a separate interface for these    default:      return NS_NewScriptHTMLElement(aContext, aElement, aParent, aReturn);  }}