I actually really like the solution in one of the comments on Dean's "sandbox.eval" post [1]. It does no browser sniffing and degrades nicely to "script insertion" on browsers which don't support eval.call(window, ... ) and execScript. The "check" for eval can be done when prototye loads - this should not affect performance - and produce a boolean indicating whether eval works or not. I'm still confused whether we should sacrifice code size for "no-browser- sniffing". What do you think?
[1] http://dean.edwards.name/weblog/2006/11/sandbox#comment70076 - kangax On Mar 23, 10:30 am, John-David Dalton <[EMAIL PROTECTED]> wrote: > I don't have an issue with Prototype.exec(), > I choose exec rather than Prototype.eval (because issues with browsers > that reserve the word eval for only the real eval method only), it is > shorter than Prototype.globalEval(), its not negatively associated > with eval() <evil>, and eval isn't used once in the method. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---