On 10/29/14, 2:55 PM, Allen Wirfs-Brock wrote:
ES since forever have made special provisions about when shadowing of such 
properties are allowed.  Both global var and function declarations reused any 
global object existing property for the declared name, except that function 
declarations refused to change the value of non-configurable readonly 
properties.

"var undefined = 5" doesn't change the value of undefined evaluated in global scope, right?

If browsers use the same semantic mechanisms a libraries (or the implementation 
level equivalent) then they will behave identically.

What browsers are doing here is defining non-configurable accessor (or readonly value, for some browsers) properties on the global. As far as I can tell, "var" and "function" can't mess with such properties today.

-Boris
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to