Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Chart API will not work with chrome app manifest version 2 #978

Open
orwant opened this issue May 9, 2015 · 3 comments
Open

Bug: Chart API will not work with chrome app manifest version 2 #978

orwant opened this issue May 9, 2015 · 3 comments

Comments

@orwant
Copy link
Collaborator

orwant commented May 9, 2015

Hi,
Content security policy of Google chrome extension/app manifest version 2.0 has following
restrictions on apps:
1. Inline JavaScript will not be executed.
2. eval() statements are disallowed.
Please follow http://code.google.com/chrome/extensions/contentSecurityPolicy.html#H2-3
  for more details.

Currently Google Visualization API is using:
1. eval on corechart.I.js (3 times)
2. eval on jsapi 
3. inline scripts (body ONLOAD on the chart iframe)
chrome apps using chart apis can not be updated to v2 till these issues are resolved.

What component is this issue related to (PieChart, LineChart, DataTable,
Query, etc)?
Chart API


Are you using the test environment (version 1.1)?
(If you are not sure, answer NO)


What operating system and browser are you using?
Chrome version 22.0


*********************************************************
For developers viewing this issue: please click the 'star' icon to be
notified of future changes, and to let us know how many of you are
interested in seeing it resolved.
*********************************************************

Original issue reported on code.google.com by pratibhag@google.com on 2012-07-27 06:04:27

@orwant
Copy link
Collaborator Author

orwant commented May 9, 2015

As of now manifest version 1 apps are not being added in webstore.

Original issue reported on code.google.com by jainrohit@google.com on 2012-08-02 06:34:49

@orwant
Copy link
Collaborator Author

orwant commented May 9, 2015

For Chrome Apps you can either use <webview> or sanboxed page that you can embed in
you page.
In first case you have limited communication with embeded page. For sanboxed page you
can communicate with embeded page via window.postMessage. Sandbox is also available
for Chrome extensions. Note that sanboxed page do not have access to chrome API.

Original issue reported on code.google.com by jarrodek on 2013-11-02 10:46:54

@orwant
Copy link
Collaborator Author

orwant commented May 9, 2015

apparently its possible to load jsapi and chart api from the background page, then use
it in content script like:
var background = chrome.extension.getBackgroundPage();
if (background.google && background.google.visualization) {
  //use it    
}

https://gist.github.com/battlehorse/1240641

Original issue reported on code.google.com by zmandel on 2014-07-21 16:53:42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant