var url =
Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsString);
url.data = aUrl;
var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(Components.interfaces.nsIWindowWatcher);
var theWindow = ww.openWindow(null, "chrome://browser/content/browser.xul",
"_blank",
'chrome,dialog=no', url);
theWindow .resizeTo(g_width, g_height);
theWindow .moveTo(g_xPos, g_yPos);
>var theWindow = ww.openWindow(null, "chrome://browser/content/browser.xul", "_blank", 'chrome,dialog=no', url);
>theWindow .resizeTo(g_width, g_height);
>theWindow .moveTo(g_xPos, g_yPos);
>
>
I'm not sure that it's possible to resize and move a window immediately
after it's been created, you might try waiting for it to load first.
--
Warning: May contain traces of nuts.
I discovered what the issue was! I changed the openWindow call to
ww.openWindow(null, url, 'Title of Window', features, null);
Once I did that I was able to add events handlers and control the window. So
it must of been an issue with using the browser XUL. Hmmm? Interesting!