Can someone explain why I get the HTML1504: Unexpected end tag warning when using the Google visualization API to display a chart?
I was debugging a website where the chart rendered fine in Firefox but didn't display any data in IE11. In the end, I fixed the problem (incorrect date format, which IE11 handled differently for Firefox), but spent a lot of time trying to track the above error.
My code is based on the code example https://developers.google.com/chart/interactive/docs/quick_start , which gives the same message. Nothing untimely appears in either JSLint or the W3C HTML Validator.
The warning disappears if I comment on the line google.load('visualization', '1.0', {'packages':['corechart']}); , but this will clearly stop the chart. Changing IE11 compatibility settings had no effect.
The error appears in the IE11 Developer Console, but nothing looks like the console console, browser console, or Firebug in Firefox. IE11 reports an error caused by the </script> at the end of my chart code (this is embedded javascript, not a separate file). Removing the </script> causes HTML errors (as expected!)
I am intrigued by the fact that calling a function in Javascript should be able to throw an error in the surrounding HTML. Does a warning mean? Can this be avoided?
javascript html internet-explorer google-visualization charts
Jri
source share