Changes to unsafeWindow

已查看 42 次
跳至第一个未读帖子

Will Bamberg

未读,
2014年4月11日 14:18:332014/4/11
收件人 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

未读,
2014年4月15日 08:47:522014/4/15
收件人 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
回复全部
回复作者
转发
0 个新帖子