Matthew Gertner wrote:

FYI I load the content into a popup and I want it to be able to close the 
popup. So the real chrome function looks like:

contentWindow.wrappedJSObject.close = function() {
 chromeWindow.close();
};

But as I said, the default close() method seems to be called instead and I get 
an error about not being able to close a window that wasn't opened using script.
Well, you could turn of that error; it's just a pref. Of course you would then decide whether to trap all the other DOMWindowClosing events to stop other random scripts from closing windows.

Alternatively, you could maybe looking into setting the window to have an app docShell, in which case it's allowed to close itself.

--
Warning: May contain traces of nuts.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to