>
> ES5's Object.create is not sufficient to eliminate uses of __proto__,
> e.g. in Zepto.
On that note, I find this piece of JavaScript that lives inside V8
slightly amusing as it relates to this discussion:
// ES5 section 15.2.3.5.
function ObjectCreate(proto, properties) {
if (!IS_SPEC_OBJECT(proto) && proto !== null) {
throw MakeTypeError("proto_object_or_null", [proto]);
}
var obj = new $Object();
obj.__proto__ = proto;
if (!IS_UNDEFINED(properties)) ObjectDefineProperties(obj, properties);
return obj;
}
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss