3 ms·
That's a weird wording, huh. I would interpret it not as yeah this is invalid code but we fix it for you, but rather this code would be invalid if not for this
by notpushkin 2y ago
That's a weird wording, huh. I would interpret it not as yeah this is invalid code but we fix it for you, but rather this code would be invalid if not for this weird exception we carve out for it.
I would love to say “let's abolish ASI too”, but (1) some folks genuinely use it assuming that it's a syntax feature and not a compat thing, and (2) it's a compat thing, meaning it's not getting removed without a very valid reason. A shame, though.
But JS parsing is still undeniably way more strict than HTML, no?
- wizzwizz4 2y agoHow about Appendix B? https://tc39.es/ecma262/2024/multipage/additional-ecmascript-features-for-web-browsers.html https://tc39.es/ecma262/2024/multipage/additional-ecmascript... > These features are not considered part of the core ECMAScript language. Programmers should not use or assume the existence of these features and behaviours when writing new ECMAScript code. ECMAScript implementations are discouraged from implementing these features unless the implementation is part of a web browser or is required to run the same legacy ECMAScript code that web browsers encounter. Some of these are legacy APIs, but some of them are just plain syntax errors.