Is __proto__ ready needed?

BelleveInvis infinte.cdda at hotmail.com
Mon Jun 10 02:27:04 PDT 2013


Maybe some new API, like `createPrototypeModified(obj, newPrototype)`, it copies all eigen-properties of `obj` to a new object with its prototype is `newPrototype`.

----------------------------------------
> From: infinte.cdda at hotmail.com
> To: es-discuss at mozilla.org
> Subject: Is __proto__ ready needed?
> Date: Mon, 10 Jun 2013 17:06:24 +0800
>
> I think that once an object is created, its prototype should be constant.
>
> And we should add features to implement sub-typing built-in types, like Array, since this code exists (found in Zepto):
>
> zepto.Z = function(dom, selector) {
> dom = dom || []
> dom.__proto__ = $.fn
> dom.selector = selector || ''
> return dom
> }
>
> Using proxies may be one way, but it should be more convinent.
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss 		 	   		  


More information about the es-discuss mailing list