getOwnPropertyDescriptor side effects

Michał Wadas michalwadas at
Tue Jan 10 19:54:06 UTC 2017

Actually here spec repeats itself because...

*A conforming implementation of ECMAScript may provide additional*
types, values, objects, *properties*, and functions beyond those
described in this specification. *In particular, a conforming
implementation of ECMAScript may provide properties not described in
this specification, and values for those properties, for objects that
are described in this specification*.

So implementation is explicitly allowed to add new properties on objects.

Though, internal methods and internal slots are not properties:

Internal slots correspond to internal state that is associated with
objects and used by various ECMAScript specification algorithms.
*Internal slots are not object properties* and they are not inherited.

So it's spec violation to have custom [[GetOwnProperty]] implementation
on ordinary objects.

On 10/01/17 20:36, Boris Zbarsky wrote:
> On 1/10/17 2:31 PM, Michał Wadas wrote:
>> Implementations are allowed to extend objects. Otherwise presence of
>> global/console/// would violate spec...
> explicitly says that the global object may have additional properties,
> so global .console is clearly not a spec violation.
> -Boris
> _______________________________________________
> es-discuss mailing list
> es-discuss at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list