I have a Sencha Touch app. Now there is a need to distribute it as Google Chrome app. I wrapped a ST production build as Google Chrome extension and got several error messages in console:
The main question is can Sencha Touch (not ExtJS) be used for Google Chrome apps or it's definitely wrong and not supposed to? Do I need to stop here if Sencha Touch is just bad solution for Google Chrome apps?
a separate js file is the best solution otherwise you'll have to sandbox the entire page:
You can’t use inline scripting in your Chrome App pages. [...] Chrome extensions will let you relax the default Content Security Policy; Chrome Apps won’t.
you can make it even better than localStorage
by making a prefs
wrapper this way:
chrome.storage
at the app start into an internal objectsettingChanged
event to your app.prefs.set
method put the value both into the internal object and chrome.storage
.eval
in some of the js libs you use. The best solution is too refactor the code to get rid of eval
, otherwise sandbox the page, see Using eval in Chrome Extensions. Safely.I haven't used Sencha Touch so I can't say if it's easy to modify it or is it worth the effort.
Try asking on their support forum too.