On Tue, Oct 13, 2015 at 11:29 PM, Jonas Sicking <[email protected]> wrote:
> Isn't that how things work in Chrome and Opera? I don't think blink > even has a wrapper implementation. So I'm not sure what compat issues > you are referring to? > Chrome has a notion of "isolated worlds" that is sort of like our Xrays. https://developer.chrome.com/extensions/content_scripts#execution-environment Extension content scripts and web pages can only talk to each other through the DOM. You have to use postMessage or insert a <script> tag into the page like Luca described. So the compat concern is that, right now, if an extension that stores properties on nodes in the web page, the property won't be visible to the page in Chrome or Firefox. If we disable wrappers, it will be visible. The nice thing about isolated worlds is that they don't have separate globals. So you don't have to worry about separate built-in types, or whether |window| refers to the page global or the Sandbox global. I don't know much about how they're implemented, but isolated worlds seem a lot easier for extension developers to use. I do wonder if the implementation is less rigorous than ours though. -Bill > But I agree that not using wrappers comes with all sorts of risks. So > I definitely think that we should make it possible for addons to use > wrappers (again, we can debate what the default should be). > > However I don't think that xray wrappers were ever created with the > expectation that you could insert them into a JS codebase that was > written to run without wrappers, and expect that codebase to run > without problems. > > I do think we should give authors a migration path so that they can > take their existing addon code and port to firefox with wrappers. But > I think we need a gentler slope than what we have now. > > / Jonas >
_______________________________________________ dev-fxos mailing list [email protected] https://lists.mozilla.org/listinfo/dev-fxos

