Question regarding ES5
jwalden+es at MIT.EDU
Wed Feb 16 19:44:04 PST 2011
On 02/16/2011 05:32 PM, Irakli Gozalishvili wrote:
> I was under the impression that inherited properties can be overridden, regardless of their write-ability on the __proto__.
Here's another take on this -- same idea, just another statement of it.
You can override any inherited property. You just have to be explicit that you *are* overriding. As you'd do if the inherited property were an accessor get/set pair, so you do if the inherited property is not writable. If you want to override, don't set the property by =, *define* it with Object.defineProperty.
More information about the es-discuss