What do you guys think of refactoring the code from ES5 to ES6?
At the moment we still support IE 11, and IE 11 does not support ES6 and (presumably) never will.
Maybe at some point in the future we will stop supporting IE 11 and upgrade everything to ES6. Perhaps if, once the Shaka Player survey has ended, we find that not many people care about IE 11 support? I can't make any promises, of course.
We could move to ES6 without dropping IE11 support, by changing the way we develop. Uncompiled mode is the issue. In uncompiled mode, ES6 code won't run on IE11. If we are compiling ES6 down to ES5, we can still develop in ES6 and run compiled ES5 on IE11.
This will be a long transition. In particular, replacing the linter will be a giant pain.
Checklist for ES6 conversion:
build/conformance.textprotoES6 work and linter changes cherry-picked to v2.3.1 to make it easier to cherry-pick bug fixes from after these ES6 changes.
Until https://github.com/google/closure-compiler/issues/893 is resolved, we can't use ES6 syntax in our externs.
ES6 is now possible in externs! If it doesn't work right away, we may need a compiler update.
Most helpful comment
We could move to ES6 without dropping IE11 support, by changing the way we develop. Uncompiled mode is the issue. In uncompiled mode, ES6 code won't run on IE11. If we are compiling ES6 down to ES5, we can still develop in ES6 and run compiled ES5 on IE11.