joe ertaba wrote:
> ok, thanks, at last i can make it works !
>
> now would you please tell me for example how to open a window when my topic
> fires
> dump("My topic fires") //Works
> window.open("chrome://..") //does not work
Have you checked your JavaScript/error console because 'window' might
not be what you think it is, but you can use something like this:
observe: function(aSubject, aTopic, aData)
{
switch (aTopic) {
case "domwindowopened":
var self = this;
var window = aSubject;
window.addEventListener("load",
function() {
self._onWindowOpened(window);
window.removeEventListener("load", arguments.callee, false);
},
false);
break;
...
_onWindowOpened: function(aWindow)
{
if (aWindow.document.documentElement.getAttribute("windowtype") !=
"navigator:browser")
return;
...
That gives you the 'right' (chrome) window object ;)
--
Michael Vincent van Rantwijk
- MultiZilla Project Team Lead
- XUL Boot Camp Staff member (ActiveState Training Partner)
- iPhone Application Developer
_______________________________________________
Project_owners mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/project_owners