Adding Google Charts to Chrome Apps

122 views
Skip to first unread message

Claus

unread,
Oct 2, 2015, 7:23:44 AM10/2/15
to Google Chrome Developer Tools
Is it possible to add google charts to Chrome Apps?

Since chrome apps prevents the use of loading external scripts in the header of the page, is there another way to load the JSAPI library loader.

Using the prescribed method

<html>
 
<head>
   
<!--Load the AJAX API. Do this only once per web page! -->
   
<script type="text/javascript" src="https://www.google.com/jsapi"></script>


generates this error.

Refused to load the script 'https://www.google.com/jsapi' because it violates the following Content Security Policy directive: "default-src 'self' blob: filesystem: chrome-extension-resource:". Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.

PhistucK

unread,
Oct 2, 2015, 7:40:30 AM10/2/15
to Google Chrome Developer Tools

On Fri, Oct 2, 2015 at 2:23 PM, Claus <claus....@gmail.com> wrote:
Since chrome apps prevents the use of loading external scripts in the header of the page

Are you sure it blocks them without any way to unblock? I believe you just need to set your Content Security Policy appropriately. The console error backs that up.



PhistucK
Reply all
Reply to author
Forward
0 new messages