Hi,

first of all thanks alot.Is it possible to do that with AddEventListener ? I
can't get it to work. Here is what I did:
1.Find the <tab> element(s)
2.QI the element to nsIDOMEventTarget (I was surprised this worked, but I
can't think of another way)
3.AddEventListener (tried both "onselect" and "select")

But HandleEvent never gets fired.

Martin

PS: I hope that it's now a xpcom question 


-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Neil Stansbury
Gesendet: Mittwoch, 17. August 2005 10:09
An: [email protected]
Betreff: Re: Getting notified of tab change


This is a DOM question not XPCOM, but you just need to listen for the 
'onselect' event.

<tab id="foo" onselect="selectionChange( this );"/>

If you are adding to an existing app tabs changes (Firefox?) add an 
'onselect' event handler rather than the above.


N


Martin Kremer wrote:
> Hi,
> 
> first of all, thank you for the help with the content problem, I 
> solved id by using a WebProgressListener.
> 
> Now I have another question:
> Is there any way for my extension to get notified of a tab change, 
> i.e. the user has more than one tab open and switches between them? I 
> think I could use some getfocused or getactivewindow functions, but 
> this requires me to poll every second or so, which I think is a bad 
> idea.
> 
> Thanks in advance,
> Martin
> 
_______________________________________________
Mozilla-xpcom mailing list
[email protected] http://mail.mozilla.org/listinfo/mozilla-xpcom


_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to