when I use gadgets.io.makeequst() or _IG_fetchFeedAsJSON() and my callback function has an error then there is no hint about it in the FireFox error console o in firebug. It seems it will catch all exceptions and silently ignore them.
I hve first noticed it with gadgets.io.makeRequest() when I was making a feed reader gadget and now I am making a greasemonkey script that runs on iGoogle to add functionality to iGoogle's own built-in inline RSS feed gadgets. On the iGoogle page (outside of the gadgets) I have to use _IG_FetchFeedAsJSON() and this is showing the same behavior. This is extremely annoying because it makes debugging extremely cumbersome. Is this a bug or is this intentional? I am relatively new to JavaScript, this is what I have so far: http://userscripts.org/scripts/show/104040 and this is how I am using the function: /** * This function will trigger the refetch (and render) process of our feed object */ this._fetch = function(){ var w = unsafeWindow; var that = this; w._IG_FetchFeedAsJSON( this.url, function(data){ if (data){ that.feedData = data; that.render(); }else{ ibf_log('no data for feed ' + that.a); } }, '', true ); } What would be the most practical way of making it throw an error to the console. Should I simply surround the body of my anonymous function with a try/catch and log the error (I haven't tried this yet), would this work? And then I have another question (which is more important): _IG_FetchFeedAsJSON on the iGoogle page has a slightly different signature than what is documented in the deprecated gadgets API and I'm not even sure whether I am using it corectly, * is there any way to force it to return more than 9 entries? * is there any way to make it return a date for each entry? if not: * is there any way to load/include the "normal" gadgets.io API in the context of the iGoogle page by injecting a carefully crafted script tag to load it from the google servers so I could use that instead? (I tried and at one point I almost succeeded with this but it still could not fetch the feed (or reach the google proxy) because for some reason it always tried to make a request to some (wrong) relative URL and got only 404 responses)? -- You received this message because you are subscribed to the Google Groups "iGoogle Developer Forum" group. To view this discussion on the web visit https://groups.google.com/d/msg/Google-Gadgets-API/-/dWE1MUtjQW5NWndK. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/Google-Gadgets-API?hl=en.
