Conditional function definitions in IE5
It looks like all cool kids except for IE5 know what to do with this:
if (some_condition) {
function f() { alert(”true”); }
} else {
function f() { alert(”false”); }
}
When calling f(), Firefox and Safari will show “true” when some_condition was TRUE at the load time, and “false” when it evaluated to FALSE. IE5 pays attention to the if-else construction (and no code will be executed in the else-block if the some_condition is FALSE), but it DOES redefine the function. Yes, even though it’s in that block that’s not being executed.
Be careful!
July 23rd, 2008 at 17:23
IE5? Does anybody still use it?
Look here - http://webbugtrack.blogspot.com/ probably you’ll find a lot of interesting things and all around browsers
July 23rd, 2008 at 17:27
Believe it or not.
July 23rd, 2008 at 17:29
Amazing bug parade btw!