J
Jorge
Mention that *you* consider it harmful.
Plus a link to the convoluted non-arguments(*) in your (OMG) long
post...
(*)
1.- WTHIT ?
javascript:alert(document.createElement
("script").canHaveHTML):undefined
2.- Wow:
"The file name changed it's not "menu.js", but now "menu-
degrading.js",
but notice how Steve gets that wrong a couple of times. That right
there
is evidence that the "degrading" part is unrelated to the original
code."
3.- That says nothing about the validity of the pattern:
"The inline code at the end of menu-degrading.js loops through
elements
in the document. It uses all global variables, including a global
loop
counter |i|."
4.- The same global context in which any program (read: <script>) is
run:
"The eval method is called in global context."
5.- idiocy++ ?:
"Looping through the DOM while the page loads is a strategy that
hurts
performance."
6.- Again ?
"AISB, eval is called in global context. Steve did not mention this,
and
the code is so naive that I doubt he is even aware of it"
7.- Of course, it's a <script>, remember ?
"but the code must exist in global context"
8.- Etc...