On 21/10/13 16:19 , Matthew Gertner wrote:
I'm loading a page into a <browser type="content"> but I want the close() 
method to call a function defined in chrome. I tried the obvious:

window.wrappedJSObject.close() = function() { ... };

However, the old close() method is still called (as far as I can tell). I guess 
I'm being thwarted by some wrapper despite modifying wrappedJSObject?


Uh, I hope you meant:

> window.wrappedJSObject.close = function() { ... };

(ie, no braces after close[()])

But *if* you're managing to touch the underlying object, that's a security issue waiting to happen, AIUI (what if content defines a setter function on the window's "close" property?). CC'ing bholley who gave a talk[0] about this stuff and knows more about this (and might have solutions and/or assuage my fears as to the security of this).

~ Gijs

[0] https://air.mozilla.org/enter-the-compartment/
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to