[Project_owners] Event handling

Pete Collins pete at mozdevgroup.com
Fri Jun 24 09:24:02 EDT 2005


    var contentArea = window._content;
    contentArea.addEventListener("load", test1, true);

You don't want to add the event listener to the XUL window you want to 
add it to the content area.


Michael Johnston wrote:

>i use 
>   window.addEventListener("load", init, true);
>On 6/24/05, Luca Minuti <lithian at tiscalinet.it> wrote:
>>I'm developing an extension that every time a page is loaded must do
>>some work. The first thing to do is intercept the page load, so I
>>write this code:
>>function test1()
>>  alert('test1');
>>top.getBrowser().addEventListener("load", test1, false);
>>But the alert will never shown. Any one can help me?
>>Project_owners mailing list
>>Project_owners at mozdev.org
>Project_owners mailing list
>Project_owners at mozdev.org

Pete Collins - Founder, Mozdev Group Inc.
Mozilla Software Development Solutions
tel: 1-719-302-5811
fax: 1-719-302-5813

More information about the Project_owners mailing list