views:

19

answers:

0

Steps to reproduce issue: 1. Create a Chrome extension using content_scripts. 2. Add the Google JS api to your background.html file in order to use the Calendar API. 3. Try running google.load("gdata", "1");

I'm trying to use the Calendar API in my Chrome extension. I'm using content_scripts to run my js file when the page initially loads. In my background page, background.html, I'm loading the Google JS library with:

<script src="http://www.google.com/jsapi?key=keyhere" type="text/javascript"></script>

I then try to do google.load("gdata", "1"); in both the background.html file and content_scripts.js, my js file, just to check if it is working or not using Chrome's JS Console. In background.html it simply does nothing at all even though I have Google related code in it and it then errors in content_scripts.js saying google is not defined.

How can I add this API to my extension so that I can use it? I haven't been able to find a way as placing it in the manifest.json file doesn't work, either.

thanks!