result = AppendChildTo(content, PR_FALSE);
result = AppendChildTo(content, PR_FALSE, PR_FALSE);
nsHTMLOptionElement::Initialize(JSContext* aContext,                                 JSObject *aObj,                                PRUint32 argc,                                 jsval *argv){  nsresult result = NS_OK;  if (argc > 0) {    // The first (optional) parameter is the text of the option    JSString* jsstr = JS_ValueToString(aContext, argv[0]);    if (jsstr) {      // Create a new text node and append it to the option      nsCOMPtr<nsIContent> content;      result = NS_NewTextNode(getter_AddRefs(content));      if (NS_FAILED(result)) {        return result;      }      nsCOMPtr<nsITextContent> textContent(do_QueryInterface(content));      if (!textContent) {        return NS_ERROR_FAILURE;      }      result = textContent->SetText(NS_REINTERPRET_CAST(const PRUnichar*, JS_GetStringChars(jsstr)),                                JS_GetStringLength(jsstr),                                PR_FALSE);      if (NS_FAILED(result)) {        return result;      }            // this addrefs textNode:      result = AppendChildTo(content, PR_FALSE);      if (NS_FAILED(result)) {        return result;      }    }    if (argc > 1) {      // The second (optional) parameter is the value of the option      jsstr = JS_ValueToString(aContext, argv[1]);      if (nsnull != jsstr) {        // Set the value attribute for this element        nsAutoString value(NS_REINTERPRET_CAST(const PRUnichar*,                                               JS_GetStringChars(jsstr)));        result = nsGenericHTMLContainerElement::SetAttribute(kNameSpaceID_HTML,                                                             nsHTMLAtoms::value,                                                             value, PR_FALSE);        if (NS_FAILED(result)) {          return result;        }      }      if (argc > 2) {        // The third (optional) parameter is the defaultSelected value        JSBool defaultSelected;        if ((JS_TRUE == JS_ValueToBoolean(aContext,                                         argv[2],                                         &defaultSelected)) &&            (JS_TRUE == defaultSelected)) {          nsHTMLValue empty(eHTMLUnit_Empty);          result = SetHTMLAttribute(nsHTMLAtoms::selected, empty, PR_FALSE);          if (NS_FAILED(result)) {            return result;          }                  }        // XXX Since we don't store the selected state, we can't deal        // with the fourth (optional) parameter that is meant to specify        // whether the option element should be currently selected or        // not. Does anyone depend on this behavior?      }    }  }  return result;}