Is there any reason why should this line of code fail?
new Function("eval('function foo(){ alert() }'); foo()")()
It pops an alert in Chromium as expected, but fails in Firefox (foo is not defined). Is this a Firefox bug, or is there something wrong with my code?