if (target) { SetFocusedElement(target); UpdateCommands("focus");
nsCOMPtr<nsIDOMElement> element = do_QueryInterface(t); if(element) { SetFocusedNode(t);
XULCommandDispatcherImpl::Focus(nsIDOMEvent* aEvent){  nsCOMPtr<nsIDOMNode> t;  aEvent->GetTarget(getter_AddRefs(t));  nsCOMPtr<nsIDOMElement> target = do_QueryInterface(t);    if (target) {    SetFocusedElement(target);    UpdateCommands("focus");  }  return NS_OK;}