Chrom API 學習筆記

一、What is the CSP for Chrome Apps

The content security policy for Chrome Apps restricts you from doing the following:web

  • You can’t use inline scripting in your Chrome App pages. The restriction bans both <script> blocks and event handlers (<button onclick="...">).chrome

  • You can’t reference any external resources in any of your app files (except for video and audio resources). You can’t embed external resources in an iframe.json

  • You can’t use string-to-JavaScript methods like eval() and new Function().app

   How to comply with CSP
ide

    All JavaScript and all resources should be local (everything gets packaged in your Chrome App).
google

二、How the lifecycle works

                                   

三、Upload your app via the Developer Dashboard
url

  1. Compress your application's root directory (the folder containing the manifest.json file) into a .zip file.spa

  2. Go to the Chrome Web Store Developer Dashboard and log in with a developer-verified Google Account. (If you don't have a verified account, you can sign up for a nominal fee.)rest

  3. Click Add new item.code

  4. Accept the terms and services agreement to continue.

  5. Use the choose file dialog box to find the .zip file in your system. Select that file to upload.


四、CCA

To use Apache Cordova with an existing Chrome App, you use the cca (c ordova c hrome a pp) command-line tool.

基於Apache Cordova開發移動平臺上的Chrome Apps 

相關文章
相關標籤/搜索