This is true of strict mode as well, which shipped in ES5.
"use strict";
try {
a = true;
} catch(e) {
// only runs in strict mode
}
It's true of any mode switch that makes the language smaller. You shouldn't write non-strict (or non-strong) code if you opted into that mode, and catching those errors defeats the purpose of using it.
But it's not only true of mode switches...
try {
JSON.parse("{}");
} catch(e) {
// only runs in browsers that don't support JSON.parse
}
try {
[ 1, 2, 3 ].forEach(function(x) { /* ... */ });
} catch(e) {
// only runs in browsers that don't support forEach
}
Or even just:
const x = 10;
// only runs in browsers that support const
Any language change can cause differences between what executes in one browser vs. what executes in another. What strong mode guarantees is that if your code doesn't throw errors in strong mode, it won't throw errors in non-strong-mode (which is more than many changes guarantee!). Any other kinds of compatibility guarantees are impossible to make unless your changes are literally meaningless.