if (aValue) { DispatchDOMEvent(NS_LITERAL_STRING("DOMItemSelected")); } else { DispatchDOMEvent(NS_LITERAL_STRING("DOMItemUnselected")); }
nsHTMLOptionElement::SetSelectedInternal(PRBool aValue, PRBool aNotify){  mIsInitialized = PR_TRUE;  mIsSelected = aValue;  if (aNotify) {    nsIDocument* document = GetCurrentDoc();    if (document) {      mozAutoDocUpdate(document, UPDATE_CONTENT_STATE, aNotify);      document->ContentStatesChanged(this, nsnull, NS_EVENT_STATE_CHECKED);    }  }  return NS_OK;}