Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Chrome App

jlchereau edited this page May 16, 2014 · 18 revisions

##Introduction

The best introduction to Chrome Apps is provided by Google. Google also provides a developer guide.

Chrome apps forbid eval and new Function unless they run in a sandbox. So Kendo UI controls which rely heavily on templates and eval can only run in a sandboxed iFrame. This is further explained by Telerik.

Sandboxed iFrames have other limitations: they have no access to Chrome apps APIs (including storage) and cannot run external web pages, which we need for authenticating with identity providers like Facebook, Google, Twitter and Windows Live.

So our Chrome packaged app needs an application wrapper to contain:

  • the sandboxed iFrame that displays our UI based on Kendo widgets;
  • the webview that displays oAuth identity provider login screens (Google, Facebook, Twitter, Windows Live,...)
  • the code that glues everything together using chrome APIs

##Building the Chrome App

Building the Chrome app with sandboxing requires the addition of 5 files:

##Loading and testing the Chrome App

In Chrome, call menu tools -> extensions or type chrome://extensions in the address bar and check the Developer mode checkbox.

Chrome Extension

A button to Load unpacked extension from a directory is now displayed. Click this button and select the www directory on your computer, which should contain manifest.json.

Then the chrome app is displayed in the list of extensions with a Launch link that you can click to run it.

There is a link to Inspect views which launches the Chrome Developer Tools. Unfortunately this link is not very helpful because the list of source files given access to is not relevant. To access the Chrome Developer Tools with a comprehensive context, click Launch and right click the Chrome packaged application to display a contextual menu and click Inspect element.

Clone this wiki locally