To followup to myself:
> They are defined in the context the eval is executed in. That is: as
> inner functions of the evalScripts method.
The way evalScripts is implemented in prototype: as inner functions of
the enumerator iteration.
A third solution (untested) would be
evalScriptsGlobal: function() {
return this.extractScripts().map(function(s){eval(s)}.bind(window));
},
directly changing evalScript could be problematic. You never know if
someone depends on the current behaviour of encapsulation.
Bye,
Martin
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs