I'm pretty sure that at some point someone will create a library to test for ES6 compatibility when the JS code loads, I envision something like:
if ES6 {
use "mycode_js6.js";
}
else {
use "mycode_js6_to_js5.js";
}
or something similar.