[Webkit-unassigned] [Bug 14102] eval() to create an anonymous function.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 12 14:04:23 PDT 2007
http://bugs.webkit.org/show_bug.cgi?id=14102
ggaren at apple.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
------- Comment #1 from ggaren at apple.com 2007-06-12 14:04 PDT -------
This is correct behavior. A stand-alone nameless function expression is a
syntax error because it's unclear whether the statement is a function
expression or a function definition.
The simplest solution is to surround your function expression with parentheses,
like so:
eval('(function() { alert("test"); })');
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list