Re:Prototypes Are Not Classes
by masklinn on Sunday January 19, 2014 @03:40PM
(#7085900)
> There is a problem with accessing prototypes of objects, as they are not exposed to the user
Actually, Object.getPrototypeOf was added in ECMAScript 5.1. It's even supported by IE9.
> only available through internal property __prototype__ (IIRC)
It's an external property (the internal one is `[[Prototype]]`_, and is called `__proto__`. It's non-standard, although all modern browsers implement it (even IE11, but not IE10)
Actually, Object.getPrototypeOf was added in ECMAScript 5.1. It's even supported by IE9.
> only available through internal property __prototype__ (IIRC)
It's an external property (the internal one is `[[Prototype]]`_, and is called `__proto__`. It's non-standard, although all modern browsers implement it (even IE11, but not IE10)