Fixing nsbeta3+ bug 31539. Adding support for the 4.x DOM property 'text' on links. r=pollmann@netscape.com

git-svn-id: svn://10.0.0.236/trunk@76633 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%netscape.com 2000-08-18 07:46:58 +00:00
parent 3913565437
commit 0033a2db23
2 changed files with 22 additions and 4 deletions

View File

@ -660,8 +660,17 @@ nsHTMLAnchorElement::GetHash(nsString& aHash)
NS_IMETHODIMP
nsHTMLAnchorElement::GetText(nsString& aText)
{
// XXX TBI
return NS_ERROR_NOT_IMPLEMENTED;
aText.Truncate();
nsCOMPtr<nsIDOMNode> child;
mInner.GetFirstChild(getter_AddRefs(child));
if (child) {
child->GetNodeValue(aText);
}
return NS_OK;
}
NS_IMETHODIMP

View File

@ -660,8 +660,17 @@ nsHTMLAnchorElement::GetHash(nsString& aHash)
NS_IMETHODIMP
nsHTMLAnchorElement::GetText(nsString& aText)
{
// XXX TBI
return NS_ERROR_NOT_IMPLEMENTED;
aText.Truncate();
nsCOMPtr<nsIDOMNode> child;
mInner.GetFirstChild(getter_AddRefs(child));
if (child) {
child->GetNodeValue(aText);
}
return NS_OK;
}
NS_IMETHODIMP