On Tue, Dec 4, 2012 at 12:42 PM, Allen Wirfs-Brock <[email protected]>wrote:
>
>
> If you forget to do the super[create] call you don't get [[Prototype]]
> initialized. However, if you leave out that super call you will also not
> allocate any superclass provided per instance state. So, it would be
> buggy anyway.
>
I was really hoping this would solve the Array subclass problem. Is this
how you imagined it working then?
Array.@@create = function() {
var newObj = [];
newObj.__proto__ = this.prototype;
return newObj;
};
--
erik
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss