[client] js: Limit syntax back to ES5, emit ES5-compatible output #834
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reasoning
Recent changes (made by me) have (inadvertently) introduced ES6 1 Javascript features to the generated client code which are only compatible with "modern", i.e. post-2017 browsers.
This PR aims to make the client code once again ES5-compatible since it wasn't a conscious decision and we do not want to lock ~6% 2 of global users out of reading and posting comments just out of laziness.
See also discussions in #822 (comment), and sorry for making @Kerumen sad. If we decide to move to ES6 and other niceties, it should be a conscious decision backed by data and arguments, not my late-night copy-pasting.
Footnotes
Also called ECMAScript 2015? ↩
Maybe just 4%, but still, out of a reported 4,6 billion internet users, that'd make 186,400,000 people... ↩