Brian King wrote:

> [Firefox Sidebar]
>
> I can find out when my content is loading using:
>
> document.getElementById("sidebar").addEventListener("DOMContentLoaded", 
> myFunction, false);
>
> However, onclose and onunload on the content loaded in does not work. Is 
> there is a way to find out when the sidebar is closing? Preferably the 
> solution determines all cases (x button being clicked, some other 
> content taking the place of your content, Firefox closing).
>
>   
Try to use

document.getElementById('sidebar').addEventListener('unload', 
yourUnloadFunction, true);

and it should work. After initiating capture, all events of the 
specified type will be dispatched to the registered listener before 
being dispatched to any EventTargets beneath it in the DOM tree. Events 
which are bubbling upward through the tree will not trigger a listener 
designated to use capture.

Daniel
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to