Extends expression performs differently on Edge

Alexander Jones alex at weej.com
Fri May 26 09:14:23 UTC 2017


`y, z` is comma operator, no?

On Fri, 26 May 2017 at 08:57, Gareth Heyes <gareth.heyes at portswigger.net>
wrote:

> ```javascript
> 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.
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170526/66883906/attachment-0001.html>


More information about the es-discuss mailing list