Harvested from an Opera bug report, here is another interesting surprise from Gecko internals: Object.prototype.eval . It's like a normal eval() but in the scope of that object. In other words, doing
is practically the same as doing
(Before you ask, the best practice would be to say either
Using eval should be avoided and generally can be avoided without problems. So don't let me catch you using any of the two first snippets on a production site!)
So hey Gecko, where did this come from? Is it something we should copy and implement or something we should scorn and point fingers at?