Hello! I'm trying to use the sample code from
AuthSample in the Safari extension
I've got this function along with other code from the sample, and the part that loads the library.
function handleClientLoad() {
safari.extension.globalPage.contentWindow.console.log(gapi);
gapi.client.setApiKey(apiKey);
checkAuth();
}
This is what i get once the lib is loaded - and there's no client or auth in the gapi object.
[Log] Object (popover.html, line 29)
_: Object
config: Object
load: function (a, b) {return ua(function(){return xa(a,b)});}
loaded_0: function (a) {w[x](a);I[R]=null;}
loaded_1: null
__proto__: Object
Cause of that I get an error about undefined functions. handleClientLoad never called manually, so i guess it means that it's loaded.
Am i missing something? Or is this never going to work in Safari extension?
Thank you