Mohamed Mansour

Software Artist who happens to be a Ninja


How to communicate between JavaScript sandboxes

iOS 8 introduced a great new development API called Action Extensions. Action Extensions are basically a safe way to extend certain apps in iOS 8 using JavaScript and Swift (Obj-C). The same concept applies with Chrome Extensions since they share similar security models for Content Scripts/Action Extensions.

One month prior to WWDC, I was one of the lucky developers invited by Apple (on behalf of Microsoft) to create a complex Action Extension. The extension I created was showcased in the WWDC keynote, Bing Translate. In this post, I will explain how Action Extensions are no different than Bookmarklets but with limitation, and how we can communicate between the protected JavaScript sandboxes.

I have published the JavaScript portion as open source, you can fork it over github.com/mohamedmansour/bing-translate/

What are Action Extensions

They are basically bookmarklets sandboxed within...

Continue reading →