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 =
  Components.classes["@mozilla.org/appshell/window-mediator;1"]
  .getService(Components.interfaces.nsIWindowMediator);

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

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

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

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

Thank you,
Eric

--- "Eric T." <[EMAIL PROTECTED]> 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
> [email protected]
> http://mozdev.org/mailman/listinfo/project_owners
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to