I am writing Firefox extension using C++.
I am trying to access XUL:tabox element in "TabOpen" event handler,
but I am unable access any XUL element.
I am putting here pseudocode of my extension for reference:
HandleEvent()
{
if (event type is TabOpen)
{
nsCOMPtr<nsIDOMNode> OriginalNode = do_QueryInterface(event-
>GetTarget);
nsCOMPtr<nsIDOMNodeList> childlist;
//
// Note here that I got OriginalNode's local name as
"tabbrowser"
//
OriginalNode->GetChildNodes(getter_AddRefs(childlist));
PRUint32 len;
childlist->GetLength(&len); // Return 1; consider only "popup" child
element.
nsString localName;
nsCOMPtr<nsIDOMNode> node1;
childlist->Item(0, getter_AddRefs(node1));
node1->GetLocalName(localName); // Returns "popup" as the local
name.
}
}
By traversing the DOM tree through DOM Inspector, I came to know that
XUL elements are anonymous content.
How do I access these XUL elements?
Very Thanks in advance,
Vaibhav.
> Hi All,
>
> I am writing Firefox extension using C++.
> I am trying to access XUL:tabox element in "TabOpen" event handler,
> but I am unable access any XUL element.
Everyone has moved to the mozilla.* newsgroups hosted on the news.mozilla.org news server.
I suggest that you ask your question there.
See this message: http://groups.google.com/group/netscape.public.mozilla.dom/msg/3a433f9688bca2d9
and this message: http://groups.google.com/group/netscape.public.mozilla.dom/msg/bfa8b640bfaee985