Extends expression performs differently on Edge
I certainly do not mind! I am happy to file bugs but if you like, you can file these at microsoft/ChakraCore!
I’ve filed this one here: Microsoft/ChakraCore#3040
From: es-discuss [mailto:es-discuss-bounces at mozilla.org] On Behalf Of Gareth Heyes Sent: Wednesday, May 24, 2017 1:24 AM To: es-discuss at mozilla.org Subject: Extends expression performs differently on Edge
Hi all
I hope you don't mind me posting this stuff. I enjoy finding these quirks. This one alerts on Edge but not on other browsers.
1,class extends[]/alert(1){} // alerts on Edge, syntax error on other browsers
Ok cool I'll report it there. I have another one: ັັັalert(ັັັ'LOL Edge'ັັັ)ັັັ
class y{}class z{}
class x extends y, z{}/alert(1)/+alert(2)
Edge seems to allow non-standard syntax here. I guess to allow you to extend multiple classes but as far as I'm aware this is non-standard syntax. The code above calls alert(2), if you change it to a class expression both alerts are called. It's a syntax error on other browsers.
y, z
is comma operator, no?
I hope you don't mind me posting this stuff. I enjoy finding these quirks. This one alerts on Edge but not on other browsers.
1,class extends[]/alert(1){} // alerts on Edge, syntax error on other browsers