Hello All,
I have a question about the event model in Mozilla.
I need to know when user switches pages or when he (or she) closes a window.
What I do is to add a listener to 'unload' event to an nsIDOMWindow everytime I detect the user opens a new window/tab.
The nsIDOMWindow interface pointer is obtained from the nsIWebProgress -> GetDOMWindow() method.
But the listener seems to be called just once, at the end of the first document. Is the event listener valid only for one document ? Should I have to re-add it over and over again when a new document begins?
Can anyone please kindly explain in what consists the precise mechanism? When and where the listener should be added and when it stops being valid?
Or, alternatively, could you please kindly indicate me some documentation that enlights this subject?
Thank you very much in advance for your kind help
--
Cumprimentos/Best Regards,
O.Cristina
_______________
System SW Engineer/Engenheiro de SW de Sistemas
MarkTest, Lda