News for hackers. Stuff that matters.
Re:HTML comments work in JavaScript too by bilalq on Tuesday March 08, 2022 @01:13PM (#30603452)
Is V8 unable to remove this because of old, poorly-written websites?

Can it maybe shut off if it detects strict mode or something? Seems wild to find this behavior in Node and evergreen browsers.

Re:HTML comments work in JavaScript too by int_19h on Tuesday March 08, 2022 @05:08PM (#30607858)
It's part of the language spec.
Re:HTML comments work in JavaScript too by bilalq on Wednesday March 09, 2022 @03:45AM (#30612262)
Right. My question was to ask what it would take to remove it. Backwards compatibility is a concern, but could strict mode or some other flag be used to mark it as disabled?
Re:HTML comments work in JavaScript too by Leszek on Tuesday March 08, 2022 @02:16PM (#30604870)
Having it in there optionally would be even more awkward, and getting rid of it entirely isn't possible without changing the JavaScript spec /shrug