Search code examples
google-cast

What version of Javascript is universally supported?


I have developed a Google Cast receiver app. It was working quite well on my Chromecast (1st gen). But when I tried it on a Google Cast speaker (audio only, the LG H4), I got Javascript errors. The let keyword apparently is not supported.

So the question becomes: Which version of javascript is universally supported?


Solution

  • It is probably ES5 as the standard was set in 2009. You can use babel, a nodejs library, with gulp or webpack or whatever build system (even make) to transpile your ECMA-2015/ES6 code into ES5.