Boris Zbarsky wrote:
> Loaded as text/html, right?
no the server does not include a content-type header field into its HTTP
response.
> And what does your getElementsByTagName call look like? And when does
> it happen?
when I receive the net-stop event of the gtkmozembed widget.
rv = doc->GetElementsByTagName(NS_LITERAL_STRING("META"),
getter_AddRefs(list));
if( NS_SUCCEEDED(rv) && list ) {
PRUint32 len;
list->GetLength(&len);
debug("getElementsByTagName() returns %d elements\n", len);
}
else {
debug("getElementsByTagName() fails\n");
}
the result is :
getElementsByTagName() returns 0 elements
>
>>> You're not using it on an nsCOMPtr. You're using it on a MetaFilter.
>>
>> may I need to declare my filter with "MetaFilter filter" instead
>> "nsCOMPtr<MetaFilter> filter" ?
>
> No, your declaration was correct.
ok
I've try with a treewalker instead a node iterator and it does the job
and call my MetaFilter correctly .
But I try to compare the node name (get with the GetNodeName() method)
the comparison fails with name.Equals(NS_LITERAL_STRING("META")) but is
succesfull with a strcmp(NS_ConvertUTF16toUTF8(name).get(), "META")...
Any Idea ? I think it is when I use NS_LITERAL_STRING(). I've try to
follow recommendations given on
http://developer.mozilla.org/en/docs/XPCOM:Strings#Literal_Strings but
perhaps I do not use it properly...
Olivier
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding