F
Florian Loitsch
hi,
in section 10.1.8 (Arguments Object) it is stated that the "internal
[[Prototype]] property of the arguments object is the orginal Object
prototype object, the one that is the *initial* [emphasize mine] value of
Object.prototype".
Furthermore the Object.prototype property has attributes [DontEnum,
DontDelete, *ReadOnly*].
My question now: what does the "initial" refer to? To the untouched
prototype-object, or to the current Object.prototype? In the latter case:
why would the write "initial", if it can't be changed anyways (ReadOnly)?
Example:
===
Object.prototype.x = "prototype-x";
function f()
{
alert(arguments.x);
}
f(); // "prototype-x" or undefined ?
===
I'm aware, that all existing implementations I tested this example on
(Mozilla, Rhino, Konqueror), print "prototype-x". (but unfortunately they
aren't always right either...)
// florian
in section 10.1.8 (Arguments Object) it is stated that the "internal
[[Prototype]] property of the arguments object is the orginal Object
prototype object, the one that is the *initial* [emphasize mine] value of
Object.prototype".
Furthermore the Object.prototype property has attributes [DontEnum,
DontDelete, *ReadOnly*].
My question now: what does the "initial" refer to? To the untouched
prototype-object, or to the current Object.prototype? In the latter case:
why would the write "initial", if it can't be changed anyways (ReadOnly)?
Example:
===
Object.prototype.x = "prototype-x";
function f()
{
alert(arguments.x);
}
f(); // "prototype-x" or undefined ?
===
I'm aware, that all existing implementations I tested this example on
(Mozilla, Rhino, Konqueror), print "prototype-x". (but unfortunately they
aren't always right either...)
// florian