Yaffle,

(Just FWIW, I sense you're not a native English speaker, so I'll just
mention that posting a message called "Prototype.js mistakes" will
tend to be unnecessarily offensive to the folks you're trying to talk
to.)

On the script thing, by all means open a ticket on Lighthouse (details
here[1]) and submit a patch; thank you in advance.

On the eval thing:  eval is a global function, not a property of the
window object.[2]  Some implementations (like Firefox and Opera) let
you use window.eval and interpret the script in the context of the
window object, which is great, but it's non-standard behavior not
implemented by other browsers (IE and Safari, for instance).

[1] http://www.prototypejs.org/contribute
[2] http://www.ecma-international.org/publications/standards/Ecma-262.htm
--
T.J. Crowder
tj / crowder software / com

On Nov 8, 7:04 am, Yaffle <[EMAIL PROTECTED]> wrote:
> var Prototype = {
> //....
>   ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
> //....
>
> }
>
> May be next code would a little better?
>
> var Prototype = {
> //....
>   ScriptFragment: '<script[^>]*>(?:<!\\-\\-)?([\\S\\s]*?)(?:\\-\\->)?<
> \/script>',
> //....
>
> }
>
> and for:
>   evalScripts: function() {
>     return this.extractScripts().map(function(script) { return
> eval(script) });
>   },
>
>   evalScripts: function() {
>     return this.extractScripts().map(function(script) { return
> window.eval(script) });
>   },
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to