On Dec 4, 1:59 pm, yoshi <[EMAIL PROTECTED]> wrote:
> i think u guys are assuming firefox, in IE eval without the function
> wrapped in () does not cause syntax err, and even if i added the '()',

That's a bug. It should throw an error (as most of other browsers do).

> like
>
> var stuff7=eval('(function() {alert("stuff..");})')
>
> stuff7 is still undefined........according to IE8 beta2's js console
> that is.....

IE's `eval` seems to be "broken" in this regard. Here's a silly
workaround:

eval('(function(){ return function(){ alert(5) } })()')(); // alerts
"5"

[...]

Btw, what exactly do you need `eval` for?

--
kangax
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to