PRInt32 i, count = 0; nsresult rv = NS_OK;  aValue.Truncate();  ChildCount(count);  for (i = 0; i < count; i++) { nsCOMPtr<nsIContent> child;  rv = ChildAt(i, *getter_AddRefs(child)); NS_ENSURE_SUCCESS(rv, rv);  nsCOMPtr<nsIDOMNode> node(do_QueryInterface(child));  if (node) { nsAutoString tmp; node->GetNodeValue(tmp);  aValue.Append(tmp); } }
GetContentsAsText(aValue);
nsHTMLScriptElement::GetText(nsAWritableString& aValue){  PRInt32 i, count = 0;  nsresult rv = NS_OK;  aValue.Truncate();  ChildCount(count);  for (i = 0; i < count; i++) {    nsCOMPtr<nsIContent> child;    rv = ChildAt(i, *getter_AddRefs(child));    NS_ENSURE_SUCCESS(rv, rv);    nsCOMPtr<nsIDOMNode> node(do_QueryInterface(child));    if (node) {      nsAutoString tmp;      node->GetNodeValue(tmp);      aValue.Append(tmp);    }  }  return NS_OK;}