[Project_owners] Sidebar onclose/unload

Brian King brian at mozdev.org
Mon Dec 18 14:37:05 PST 2006


On 18/12/2006 00:33 (CET), Daniel Muenter wrote:

> 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.

Yes, that worked. I tried unload with false for propagation.

Thanks!

-- 
Brian King
www.mozdev.org - free project hosting for the Mozilla community


More information about the Project_owners mailing list