On 18/12/2006 23:37 (CET), Brian King wrote:
> 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.

Actually, that only got me half way there. I can detect the unload, but 
I can't prevent the sidebar from closing. Returning false doesn't do 
anything here, and the sidebar doesn't have the equivalent of 
window.tryToClose() in browser.js for the main Firefox window. Any ideas?

-- 
Brian King
www.mozdev.org - free project hosting for the Mozilla community
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to