Changes to unsafeWindow

42 views
Skip to first unread message

Will Bamberg

unread,
Apr 11, 2014, 2:18:33 PM4/11/14
to mozilla-la...@googlegroups.com
I blogged about a change to unsafeWindow that Gabor landed yesterday,
and that we are expecting will be uplifted to Firefox 30:
https://blog.mozilla.org/addons/2014/04/10/changes-to-unsafewindow-for-the-add-on-sdk/.

Briefly, you have to do something if: you use unsafeWindow or
window.wrappedJSObject to expose objects or functions from your content
scripts to web content.

You don't need to do anything if you are only exposing primitives in
this way, or if you are using unsafeWindow/window.wrappedJSObject to
access content-defined objects in content scripts.

You can also check whether you're affected by using the latest Nightly,
which includes this change.

If you have any questions about whether you need to update your code
because of this change, and how to update if you do need to, please ask
on this list.

Thanks

Will

Julien Wajsberg

unread,
Apr 15, 2014, 8:47:52 AM4/15/14
to mozilla-la...@googlegroups.com
Hey,

in the past, I did something like [1] to basically add new APIs to the content pages.
It didn't use unsafeWindow or wrappedJSObject at all, instead it used events.

I'm not sure it's useful when comparing to the new API though...
Julien
Reply all
Reply to author
Forward
0 new messages