P. 1
Ecma-262

Ecma-262

5.0

|Views: 18|Likes:
Publicado porrubenstt
Fonte: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
Fonte: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf

More info:

Published by: rubenstt on Feb 24, 2008
Direitos Autorais:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/08/2014

pdf

text

original

The value of the internal [[Prototype]] property of the Object constructor is the Function prototype
object.

Besides the internal properties and the length property (whose value is 1), the Object constructor has
the following properties:

15.2.3.1 Object.prototype

The initial value of Object.prototype is the Object prototype object (15.2.4).

This property has the attributes { DontEnum, DontDelete, ReadOnly }.

15.2.4 Properties of the Object Prototype Object
The value of the internal [[Prototype]] property of the Object prototype object is null and the value of
the internal [[Class]] property is "Object".

15.2.4.1 Object.prototype.constructor

The initial value of Object.prototype.constructor is the built-in Object constructor.

15.2.4.2 Object.prototype.toString ( )

When the toString method is called, the following steps are taken:

1. Get the [[Class]] property of this object.
2. Compute a string value by concatenating the three strings "[object ", Result(1), and "]".
3. Return Result(2).

15.2.4.3 Object.prototype.toLocaleString ( )

This function returns the result of calling toString().

NOTE 1
This function is provided to give all Objects a generic
toLocaleString interface, even though not
all may use it. Currently,
Array, Number, and Date provide their own locale-sensitive
toLocaleString methods.

NOTE 2
The first parameter to this function is likely to be used in a future version of this standard; it is
recommended that implementations do not use this parameter position for anything else.

- 85 -

15.2.4.4 Object.prototype.valueOf ( )

The valueOf method returns its this value. If the object is the result of calling the Object
constructor with a host object (15.2.2.1), it is implementation-defined whether valueOf returns its
this value or another value such as the host object originally passed to the constructor.

15.2.4.5 Object.prototype.hasOwnProperty (V)

When the hasOwnProperty method is called with argument V, the following steps are taken:

1. Let O be this object.
2. Call ToString(V).
3. If O doesn’t have a property with the name given by Result(2), return false.
4. Return true.

NOTE
Unlike [[HasProperty]] (8.6.2.4), this method does not consider objects in the prototype chain.

15.2.4.6 Object.prototype.isPrototypeOf (V)

When the isPrototypeOf method is called with argument V, the following steps are taken:

1. Let O be this object.
2. If V is not an object, return false.
3. Let V be the value of the [[Prototype]] property of V.
4. if V is null, return false
5. If O and V refer to the same object or if they refer to objects joined to each other (13.1.2), return

true.
6. Go to step 3.

15.2.4.7 Object.prototype.propertyIsEnumerable (V)

When the propertyIsEnumerable method is called with argument V, the following steps are
taken:

1. Let O be this object.
2. Call ToString(V).
3. If O doesn’t have a property with the name given by Result(2), return false.
4. If the property has the DontEnum attribute, return false.
5. Return true.

NOTE
This method does not consider objects in the prototype chain.

You're Reading a Free Preview

Descarregar
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->