4 ms·
Actually that's not true at least in Firefox and probably chrome. Take a look at http://jsfiddle.net/2LsSg/ http://jsfiddle.net/2LsSg/. window.onload/g@http
by evilpie 12y ago
Actually that's not true at least in Firefox and probably chrome.
Take a look at http://jsfiddle.net/2LsSg/ http://jsfiddle.net/2LsSg/.
window.onload/g@http://fiddle.jshell.net/2LsSg/show/:23:5
window.onload/f@http://fiddle.jshell.net/2LsSg/show/:26:5
@http://fiddle.jshell.net/2LsSg/show/ line 29 > eval:1:1
window.onload@http://fiddle.jshell.net/2LsSg/show/:29:1
(I guess jsfiddle wraps the JS code in a window.onload handler, which makes this a bit more ugly)
- randallsquared 12y agoIt's true in node.js, as of last year, which is where I use the style "var name = function name(){};", because debugging dozens of anonymous functions in node.js' callback playground will ruin your day.
- thedufer 12y agoNot true as of 0.10.24, which is what I have installed.
- badman_ting 12y agoJS engines are getting smarter about this, but you can't really rely on it. I suggest naming your functions if don't want them to be anonymous.