Property attributes, clarification please.

Asen Bozhilov asen.bozhilov at gmail.com
Thu Apr 22 00:38:03 PDT 2010


If I understand correctly specification "8.6  The Object Type"
describe semantic of native objects and does some restriction on host
objects. For example:

| Every object (including host objects) must implement
| all of the internal properties listed in Table 8. However,
| the [[DefaultValue]] internal method may, for some objects,
| simply throw a TypeError exception.

That quotation is regard table 8, which contains internal properties
common to all objects.

My question is regard "8.6.1  Property Attributes", where ECMA-262
does not restriction on host objects. As I understand these property
attributes are only for native objects and host objects can use
different approaches for property attributes.

For example in JScript, Object.prototype.propertyIsEnumerable (V) with
passed host object as the `this` value throw TypeError exception. And
that is described by Microsoft:
<URL: http://download.microsoft.com/download/8/4/2/8427CF1B-08B3-4557-952D-102E7A8FA64C/%5BMS-ES3%5D.pdf
/>

|  2.1.62   [ECMA-262]
|  Section 15.2.4.7, Object.prototype.propertyIsEnumerable (V)  page 63
|  a.If O is a host object, throw a TypeError exception.

And by ECMA-262 that is conformable behaviour, because specification
does not restrict host objects to implement these property attributes.

Does someone to make clarification on these things? Thanks.


More information about the es-discuss mailing list