2.1.12 [ECMA-262-1999] Section 8.6.2.2, [[Put]] (P, V)

V0023:

When the [[Put]] method of O is called with property P and value V, the following steps are taken:

  1. Call the [[CanPut]] method of O with name P.

  2. If Result(1) is false, return.

  3. If O doesn't have a property with name P, go to step 6.

  4. Set the value of the property to V. The attributes of the property are not changed.

  5. Return.

  6. Create a property with name P, set its value to V and give it empty attributes.

    1. __Let q be the same value as O.__

    2. __Let q be the value of the [[Prototype]] property of q.__

    3. __If q is null, return.__

    4. __If q doesn't have a property with name P, go to step 6.2.__

    5. __If the property of q with name P does not have the DontEnum attribute, return.__

    6. __Give the property with the name P of O the DontEnum attribute.__

  7. Return.

In JScript 5.x a property created using [[Put]] is given the DontEnum attribute if it shadows a prototype property with the same name that already has the DontEnum attribute.