Attribute defaults for Object.defineProperty
dhtmlkitchen at gmail.com
Sat Aug 23 22:18:17 PDT 2008
On Sat, Aug 23, 2008 at 8:07 PM, Garrett Smith <dhtmlkitchen at gmail.com> wrote:
>> On Aug 21, 2008, at 9:55 AM, Allen Wirfs-Brock wrote:
>>> Or arguably "reconfigurable".
> On Thu, Aug 21, 2008 at 8:34 AM, Neil Mix <nmix at pandora.com> wrote:
> The closest I can come to defining "sealed" is Object.isSealed:-.
> | 184.108.40.206 Object.isSealed ( O )
> | When the isSealed function is called with argument O,
> | the following steps are taken:
> | 1. If Type(O) is not Object throw a TypeError exception.
> | 2. For each named own data property P of O,
> | a. Call the [[GetOwnProperty]] method of O with P.
> | b. If the [[Flexible]] field of Result(2a) is true, then return false.
> | 3. If the internal [[Extensible]] property of O is false, then return
> | true.
> | 4. Otherwise, return false.
> | The length property of the Object.isSealed function is 1.
> Back to the definition of [[Flexible]]
> 1) true - property can be deleted using - delete - operator.
> 2) false - property is sealed. What is sealed?
> So if the property is [[Flexible]], then the properties [[value]] must
> be an object which cannot be modified. What? I'm confused. :-(
correction, I meant to write:-
if [[Flexible]] is *false*, then the property's [[value]] must be an
object which cannot be modified...
(that is what I interpreted from the spec). Allen, Pratap: Please elucidate.
> What is [[Flexible]]? Is it an object modifier/attribute or a property
More information about the Es-discuss