[Noisebridge-discuss] GlobalScopePolluter

Garrett Smith dhtmlkitchen at gmail.com
Sat Nov 23 13:13:30 UTC 2013


Mark asked a great question last night:

"Why do we need to know what happens when var is omitted?"

And the answer involves a quirk of MSIE's GlobalScopePolluter.

"Unsafe Names for Form Controls" article describes it a bit on the page
about globals:
jsfaq.org/notes/names/extra_props_global.html

See also linked post by Lasse:
Why "window.alert()" over
"alert()"?<http://groups.google.com/group/comp.lang.javascript/msg/aed8ecf1660e1dd1>
,
http://groups.google.com/group/comp.lang.javascript/msg/aed8ecf1660e1dd1

See:
Re: [JSMentors] Namespaces and global
variables<http://markmail.org/message/5eoyv35dan3a55hb>
http://markmail.org/message/5eoyv35dan3a55hb

More how GlobalScopePolluter affects non-IE browsers, even when `var` is
used:
Global Scope Polluter, copied from MSIE is and always will be problematic.
http://lists.w3.org/Archives/Public/public-script-coord/2012JulSep/0033.html
 … <http://t.co/wus7XbBK>

http://lists.w3.org/Archives/Public/public-script-coord/2012JulSep/0033.html
-- 
Garrett
@xkit
ChordCycles.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.noisebridge.net/pipermail/noisebridge-discuss/attachments/20131123/4a08817a/attachment-0002.html>


More information about the Noisebridge-discuss mailing list