i'm working on a gmail contextual gadget (GWT) to deploy on the google market place. the gadget is triggered correctly but when i try to get content matches it fail.
<Module>
<ModulePrefs author="xxx" author_affiliation="xxx" author_email="xxx"
directory_title="Test GMail Contextual Gadget"
title="Test Contextual Gadget">
<Require feature="google.contentmatch">
<Param name="extractors">google.com:EmailBodyExtractor</Param>
</Require>
</ModulePre开发者_开发知识库fs>
<Content type="html" view="card">
....
in the browser console i see the following error:
Uncaught ReferenceError: google is not defined
any idea ?
I had exactly the same issue when working with contextual gadgets and GWT. You must prefix with $wnd like this :
var matches = $wnd.google.contentmatch.getContentMatches();
see also this thread where I figured it out :
https://groups.google.com/forum/#!topic/google-apps-gadgets-api/gxNoIQUVI4k
精彩评论