setPrototypeOf vs obj.__proto__ assignment

John Barton johnjbarton at google.com
Fri Apr 4 10:22:13 PDT 2014


I was surprised to discover that in chrome at least this is valid:
  var obj = {};
  obj.__proto__ = undefined;
but this throws
   Object.setPrototypeOf(obj, undefined);

Is it intended?
jjb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140404/0eb759b6/attachment.html>


More information about the es-discuss mailing list