April 30, 2007

eval() bug in IE

eval('function(){}') evaluates to undefined in IE, the same for eval('(function(){})').

How to get the Function?

eval('[function(){}][0]')

IE, you always let me down!

1 comments:

John Resig said...

I found another way (and am using it in jQuery right now):
eval("false||function(){...}");