gapi.client undefined ONLY in chrome browser and ONLY as a gadget

865 views
Skip to first unread message

James Driscoll

unread,
Mar 6, 2013, 9:47:52 AM3/6/13
to google-api-jav...@googlegroups.com
Hi, I'm not sure if it's my code or the chrome browser but I've got a problem that is working in all other other browsers....

I have a calendar gadget that's reporting gapi.client undefined when I try to load it in google chrome (it's working in firefox,IE,opera,Safari )

in the html I've got

since I'm also using jQuery my code looks a little like this...

function handleClientLoad(){
 //is jquery ready??
 var app;  app=new App();
  app.initialise();
 };
....
App=function(){
initialise=function{
 jQuery(document).ready(function(){
 // gapi and jQuery should both be loaded here ??
...
 gapi.client.setApiKey(apiKey);
 }
};
};

when I load the gadget in google chrome there's a gapi object but it doesn't have a client (and therefore no client.setAPIKey) - the object looks like this...
  1. gapiObject
    1. _Object
    2. configObject
    3. loadfunction (a,b){return Y(function(){return $(a,b)})}
    4. loaded_0function (a){u[v](a);H[L]=e}
    5. loaded_1function (a){u[v](a);H[L]=e}
    6. __proto__Object

To further complicate matters I can run the code directly in google chrome from my website the issue only arises when trying to run it in the gadget IFrame

Is my code wrong or should I be reporting a bug to google chrome?

many thanks

James Driscoll

unread,
Mar 6, 2013, 10:17:56 AM3/6/13
to google-api-jav...@googlegroups.com
on further searching I'm wondering if it's related to this....

Issue 3:JS Client does not work in Gadget setting
https://code.google.com/p/google-api-javascript-client/issues/detail?id=3

Though this problem was reported Dec 20, 2011 so I'm hoping someone has more up to date news :-)

James Driscoll

unread,
Mar 12, 2013, 5:03:39 AM3/12/13
to google-api-jav...@googlegroups.com
Perhaps I should ask the question in a different way....
Has anyone managed to get a calendar gadget running  in google chrome using this api?
Reply all
Reply to author
Forward
0 new messages