Determine if a value is Callable/Constructible

Axel Rauschmayer axel at rauschma.de
Mon Mar 30 13:34:57 UTC 2015


> > Don’t the different assumptions as to where the instance is allocated ever clash here? What if `MySuperClass` were:
> >
> > ```js
> > class MySuperClass extends Error {
> > }
> > ```
> 

> MySubClass preallocates when invoked via new. Just like ES5. So, ```MySuperClass.call(this)``` is same as ES5.  What happens in MySuperClass depends upon the ES6 level programmer.
> 

Right, but I don’t see how an ES5-style constructor MySubContructor can allocate its instance and then have it initialized by an ES6 class (where the instance is allocated by a super-class). This is about ES5 code being confronted with ES6 code and assuming to see a constructor.

-- 
Dr. Axel Rauschmayer
axel at rauschma.de
rauschma.de



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150330/557d99c2/attachment.html>


More information about the es-discuss mailing list