Reputation: 1
I have next trouble, I add google chart to my qooxdoo desktop application. Chart work in all browsers, except mozilla. Then i want login to my app, i received error:
referenceError: google is not defined. Browser can't load:
google.charts.load('current', {'packages': ['corechart']});
Try different method for add charts, old load variant, new load variant, function for delayed load, update flash player etc. All work but not in mozilla. Maybe someone help me resolve this trouble. Thank's.
Upvotes: 0
Views: 375
Reputation: 829
I've created a qooxdoo playground example using the new and great qx.util.DynamicScriptLoader
(see http://www.qooxdoo.org/devel/api/#qx.util.DynamicScriptLoader ) and tested if google charts work with firefox:
http:// tinyurl.com/j8b7jut
The example works as expected with Firefox 49.0.1 and 50.0b6 and of course IE11 and current Chrome.
One pitfall in qooxdoo is that you have to wait until the rendering queue has finished creating the DOM elements of your widget.
The best method to ensure the DOM elements exist, is to add an appear
event listener to your widget:
widget.addListenerOnce('appear', function() {
var el = this.getContentElement().getDomElement();
// do here something useful with the DOM element connected
// to your widget, e.g. assigning it as a target for
// charting
});
So I think your code is doing something wrong.
Another pitfall may be the usage of ad or tracking blockers in your browser, which may classify the attempt to load the google charting api as tracking and block the load attempt.
Upvotes: 2