On Sep 18, 2014, at 11:29 AM, Dmitry Lomov wrote: > You haven't specified the constructor body, I assume you have intentionally > omitted it, and in that case the above is equivalent to > class A extends HTMLElement { > constructor() { > this = new super(); > } > } > > There is no explicit passing of new^ here. > > new^ is really just for 'constructors that are callable as functions as > well'. Andreas is right that it is esoteric, but supporting that seems to be > a requirement for classes design.
But just so there is no confusion, there is implicit passing of new^ going on in this example. That's necessary in order for HTMLElement to correctly the the [[Prototype]] of the object allocates. Allen _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss