Le 20/03/2013 19:04, Andrea Giammarchi a écrit :
I don't understand where is the problem ... any library that uses
__proto__ can and should be updated with a shim waiting for next
version of JS to support it.
Which library? What are the inconsistencies between the current
__proto__ draft spec and how libraries use __proto__ today? Please be
very specific; that's quite relevant when doing a de facto standard so
it's important to know.
Object.setPrototypeOf = function (object, proto) {
object.__proto__ = proto;
return object;
};
That does not look bad at all to me, educate developers out there that
__proto__ is harmful and forbidden 'cause saying "we can't do much is
already used" doesn't mean is OK to use it, same as polluting
Object.prototype, still possible, nobody does it (not in an old
fashioned way at least)
What's your point here?
I don't understand why Object.setPrototypeOf should be added or shimmed
if the best practice is to avoid using __proto__.
David
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss