-
-
Notifications
You must be signed in to change notification settings - Fork 901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of named function expressions can cause scoping issues in some implementations #12
Comments
Thanks @ckknight for pointing that out, I did not knew about that bug. Still as |
The safest way is to either use the anonymous function expression or to use a proper function declaration. They're essentially equivalent (aside from the hoisting). |
On Monday, 2011-03-28 at 09:25 , ckknight wrote:
|
Nope, just go with either |
Apparently I accidentally closed this. This is still an issue. |
I don't see how this is actually a problem. If it was |
It's minimally a memory leak in JScript (IE), since it creates two function instances rather than one. |
…plementations. Issue es-shims#12
Change above fixes this issue. closing! |
In a recent commit, many functions have been changed to be defined as named function expressions, e.g.
var bound = function bound()
. One of the issues that arises from this is that in JScript (IE),var bound
andfunction bound
create two separate functions.See http://kangax.github.com/nfe/ for more details about this.
The text was updated successfully, but these errors were encountered: