On 10/29/14, 5:44 PM, Allen Wirfs-Brock wrote:
On Oct 29, 2014, at 4:03 PM, Boris Zbarsky <[email protected]
"var undefined = 5" doesn't change the value of undefined evaluated in
global scope, right?
Prior to the ES5 spec. it actually did, as undefined was writable.
Right, but that was a change in the behavior of undefined, not or var.
It’s a bit more complicated than that. See
https://bugs.ecmascript.org/show_bug.cgi?id=78 which is a bug against
ES5.1 is addressed in the ES6 spec. Also see the reference firefox bug.
I suspect it will jog you memory.
Sure. The particular cases I'm worried about here ("window",
"location", etc) are own props, not props on the proto chain. Trying to
make stuff that's up on the proto chain not shadowable is impossible
anyway, right? You can always defineProperty on the receiver involved
and shadow that way.
-Boris
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss