made query for attributes in other namespaces legal, just not work

This commit is contained in:
peterl%netscape.com 1999-06-10 05:20:28 +00:00
parent 784f0c9bee
commit 6c8f1b966b
2 changed files with 6 additions and 2 deletions

View File

@ -784,15 +784,17 @@ nsresult
nsGenericHTMLElement::GetAttribute(PRInt32 aNameSpaceID, nsIAtom *aAttribute,
nsString &aResult) const
{
#if 0
NS_ASSERTION((kNameSpaceID_HTML == aNameSpaceID) ||
(kNameSpaceID_None == aNameSpaceID) ||
(kNameSpaceID_Unknown == aNameSpaceID),
"html content only holds HTML attributes");
#endif
if ((kNameSpaceID_HTML != aNameSpaceID) &&
(kNameSpaceID_None != aNameSpaceID) &&
(kNameSpaceID_Unknown != aNameSpaceID)) {
return NS_ERROR_ILLEGAL_VALUE;
return NS_CONTENT_ATTR_NOT_THERE;
}
nsHTMLValue value;

View File

@ -784,15 +784,17 @@ nsresult
nsGenericHTMLElement::GetAttribute(PRInt32 aNameSpaceID, nsIAtom *aAttribute,
nsString &aResult) const
{
#if 0
NS_ASSERTION((kNameSpaceID_HTML == aNameSpaceID) ||
(kNameSpaceID_None == aNameSpaceID) ||
(kNameSpaceID_Unknown == aNameSpaceID),
"html content only holds HTML attributes");
#endif
if ((kNameSpaceID_HTML != aNameSpaceID) &&
(kNameSpaceID_None != aNameSpaceID) &&
(kNameSpaceID_Unknown != aNameSpaceID)) {
return NS_ERROR_ILLEGAL_VALUE;
return NS_CONTENT_ATTR_NOT_THERE;
}
nsHTMLValue value;