Re: Conflicts between W3C specs and ES5?

On Dec 3, 2009, at 4:06 AM, Jorge Chamorro wrote:

> On 15/11/2009, at 23:45, Mark S. Miller wrote:
>
>> 1) Is the global object the same as the object at the end of the
>> scope chain? (HTML5: yes. ES5: no).
>
>
> Somehow, the truly last object in the scope chain is Object.prototype:
>
> Object.prototype.k= 27;
> console.log(k);
> -> 27
>
> For it's the last place where a reference would ever be looked up...  
> or not ?
> (now me ducks and runs :-)

No, the prototype chain is a separate concept from the scope chain.  
Entries in the scope chain are conceptually objects each of which has  
its own prototype chain.

Regards,
Maciej

Received on Thursday, 3 December 2009 12:09:57 UTC