Why are global variables *non-deletable* properties of the global object?
mjs at apple.com
Fri Jun 20 11:46:44 PDT 2008
On Jun 19, 2008, at 11:20 PM, Brendan Eich wrote:
> On Jun 19, 2008, at 8:40 PM, Mark S. Miller wrote:
>>> Try putting this in a Firefox address toolbar:
>>> You will get true (because the var binding -- not initialization
>>> -- is
>>> (because var makes a DontDelete binding outside of eval), and 42.
>> I did. Thanks for suggesting that experiment. But given the above
>> behavior, I don't understand
>> alert(delete window.foo); alert(window.foo)
>> I get true, true, undefined.
> Works correctly (true, false, 43) in Firefox 3 (try it, you'll like
Also works correctly in Safari 3.1 and the Safari 4 Developer Preview
(which implements split window support).
More information about the Es4-discuss