Hacker News new | ask | show | jobs
by v413 4261 days ago
Looking at the compiled source, it looks like ES5 and not ES3. They use "use strict" and Object.defineProperties which are ES5 features.

P.S. IE9 doesn't support ES5 strict mode so "use strict" might introduce some subtle bugs for that case.

2 comments

Could you explain how? I thought "use strict" only added more runtime checking, but does not change the semantics. Wouldn't IE9 just interpret the line as a bogus expression and move on?
I use "use strict" on JavaScript that runs over IE8/9 and I don't get errors from it.
That's because "use strict" is ignored in IE8/9 (thankfully). You usually won't run into any issues, but if you're relying on strict-mode for certain semantics you can run into some very subtle bugs. The chances of that are super low though, I've only ever done it on purpose :)