cowboy/jquery-hashchange

named function expression

tbranyen opened this issue · 8 comments

In self.start there is a named function expression: loopy which will cause issues in IE browsers, but more specifically the blackberry browser. One possible solution is to remove the function name and use arguments.callee... although I'm not sure if this is kosher.

Lark, afaik in IE, the NFE name might leak out of scope, but shouldn't have any other issues. And of course, it doesn't need to be an NFE (I just happen to like that pattern).

What do these 3 lines output for you in the Blackberry browser?

(function x(){ alert( typeof x ); })();
var y; (y = function(){ alert( typeof y ); })();
function z(){ alert( typeof z ); }; z();

undefined, function, function

This bug appears to have been fixed as a side-effect of c164cce, so I'm closing it!

@lark Which version of a Blackberry is it?

@lark Hm, this is the latest one, isn't it (do you know which model)? It would be pretty sucky if latest blackberry isn't able to create NFE properly.

Nope, latest is 6. 5 came in between that and doesn't have this issue. 4.6 is like the IE 6 of mobile web, so its hardly relevant. Even jQuery mobile is ignoring it due to currentStyle reflow issues.

Gotcha.

I remember having other NFE "issues" in Blackberry but unfortunately haven't documented which version it was :/ http://kangax.github.com/nfe/#spidermonkey-peculiarity