Annex B documents and standardizes legacy browser behavior - the way it's specified is the way browsers already do it, so the "consistent" behavior you're talking about would conflict with the way existing code already works.
On Sat, Jan 2, 2016 at 12:56 PM, kdex <[email protected]> wrote: > ES2015's annex section B.1.3 (*HTML-like Comments*) currently defines > `Comment` > in a way that makes > > ```js > <!-- This whole line > ``` > > a comment, and likewise for > > ```js > undefined --> everything after the first occurrence of "-->" in this line. > ``` > > However, the tokens `<!--` and `-->` are inherently used as *block* > comments > in HTML, whereas EcmaScript doesn't allow them to span over multiple > lines. As > a consequence, > > ```js > <!-- This looks is a comment in HTML, so > shouldn't it behave like a comment in JS, too? --> > ``` > > would result in a syntax error. > > Is this a deliberate choice? Are there reasons for or against matching > HTML's > behavior in ES2016? > > Personally, I don't use these tokens anyway, but this seems like an obvious > inconsistency to me. > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

