On 3/27/13 2:35 PM, [email protected] wrote:
@Boris: for <script class="A B C"> I only want to know if script is member of class
"A", a mere true/false descision.
OK, so scriptElem->GetClassList()->Contains() should do that for you.
int32_t containsClassVar = scriptElem->FindAttrValueIn(kNameSpaceID_None,
nsGkAtoms::_class, NS_LITERAL_STRING("xyz"), eCaseMatters);
work correctly
That won't even compile.
bool containsClassVar = scriptElem->AttrValueIs(kNameSpaceID_None,
nsGkAtoms::_class, NS_LITERAL_STRING("xyz"), eCaseMatters);
That will give you the wrong behavior (class="xyz abc" will return false).
-Boris
_______________________________________________
dev-security mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-security