[Project_owners] obtaining reference to new tab

Eric H. Jung grimholtz at yahoo.com
Wed Dec 7 11:14:27 EST 2005

Hi, I tried the following. Still not luck. I'd rather not register a
listener for all windows and compare my target to aProgress.DOMWindow
because this seems like a lot of overhead, no? Am I doing something
wrong below?

var wm =

var win = wm.getMostRecentWindow("navigator:browser");

  function() {dump("hello from onload callback\n");}, false);

printWindow = win.open("about:blank");

// This addEventListener() seems like it's too late
  function() {dump("hello from onload callback\n");}, false);

Thank you,

--- "Eric T." <cougio at gmail.com> wrote:

> It seems your attaching the progressListener to the current window
> and
> want to watch event in a new window ("win.open()" at the end...)
> Try something like registering listener for all windows and comparing
> your target to aProgress.DOMWindow, or registering your listener on
> the window's onload event. After that you might need to check if the
> status is 0 before using the event in listener...
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Project_owners mailing list