nsXFormsChoicesElement::OnCreated(nsIXTFGenericElementWrapper *aWrapper)
nsXFormsChoicesElement::OnCreated(nsIXTFBindableElementWrapper *aWrapper)
nsXFormsChoicesElement::OnCreated(nsIXTFGenericElementWrapper *aWrapper){  aWrapper->SetNotificationMask(nsIXTFElement::NOTIFY_PARENT_CHANGED |                                nsIXTFElement::NOTIFY_CHILD_INSERTED |                                nsIXTFElement::NOTIFY_CHILD_APPENDED |                                nsIXTFElement::NOTIFY_CHILD_REMOVED |                                nsIXTFElement::NOTIFY_BEGIN_ADDING_CHILDREN);  nsCOMPtr<nsIDOMElement> node;  aWrapper->GetElementNode(getter_AddRefs(node));  // It's ok to keep a pointer to mElement.  mElement will have an  // owning reference to this object, so as long as we null out mElement in  // OnDestroyed, it will always be valid.  mElement = node;  NS_ASSERTION(mElement, "Wrapper is not an nsIDOMElement, we'll crash soon");  // Our anonymous content structure will look like this:  //  // <optgroup label="myLabel"/>   (mOptGroup)  //  nsCOMPtr<nsIDOMDocument> domDoc;  node->GetOwnerDocument(getter_AddRefs(domDoc));  nsCOMPtr<nsIDOMElement> element;  domDoc->CreateElementNS(NS_LITERAL_STRING(NS_NAMESPACE_XHTML),                          NS_LITERAL_STRING("optgroup"),                          getter_AddRefs(element));  mOptGroup = do_QueryInterface(element);  NS_ENSURE_TRUE(mOptGroup, NS_ERROR_FAILURE);  return NS_OK;}