nsEvent event;
nsScriptErrorEvent event;
nsHTMLScriptElement::ScriptAvailable(nsresult aResult,                                      nsIDOMHTMLScriptElement *aElement,                                      PRBool aIsInline,                                     PRBool aWasPending,                                     nsIURI *aURI,                                      PRInt32 aLineNo,                                     const nsAString& aScript){  nsresult rv = NS_OK;  if (!aIsInline && NS_FAILED(aResult)) {    nsCOMPtr<nsIPresContext> presContext;    GetPresContext(this, getter_AddRefs(presContext));     nsEventStatus status = nsEventStatus_eIgnore;    nsEvent event;    event.eventStructType = NS_EVENT;    event.message = NS_SCRIPT_ERROR;    rv = HandleDOMEvent(presContext, &event, nsnull, NS_EVENT_FLAG_INIT,                        &status);  }  return NS_OK;}