Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

__proto__ is deprecated. Please avoid using __proto__. Use Object.getPrototypeOf and Object.setPrototypeOf instead.

__noSuchProperty__

Any object can have this "property missing" hook method. When a property accessed is not found on the object, this __noSuchProperty__ hook will be called.

Code Block
title__noSuchProperty__
var o = {    __noSuchProperty__: function(n) {       print("No such property: " + n);    }}o.foo;   // prints No such property: fooo["bar"]; // prints No such property: bar

Object.setPrototypeOf(obj, newProto)

...