On Nov 9, 5:16 am, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
> > Global eval is actually one of the most popular addition requests
> > (after people realize that `evalScripts` does not evaluate within
> > global scope :))
>
> Yeah, big time; I was just pointing out that the change suggested
> won't provide it (except in Gecko browsers).
>
> I'd done some previous work on this.  I just went and dug it out and
> cleaned it up.  This version works on FF3, IE6, Safari3win, and
> Opera9:http://pastie.org/310725

I remember JDD spent quite a lot of time in the past researching
global eval solutions. He then made one based on jQuery (but improved
in some way). I'll search old bug tracker for a relevant ticket (to
compare with your version)

>
> It  looks like Yaffle hasn't opened a ticket for this, so I 
> did:http://prototype.lighthouseapp.com/projects/8886-prototype/tickets/433

Thanks.

>
> > It's funny that after playing with comments stripping (as per author
> > suggestion) I realized that out `extractScripts` is not as robust as
> > it could be:
>
> And Yaffle's suggested addition -- if it does what I think it does,
> ignoring end tags if they're within a comment (I'm relatively
> worthless at regex) -- looks like it helps some.  Not in the situation
> you're talking about, but isn't that unrealistic?  This:
>
> function(){ return "</script>" }
>
> ...doesn't work in most browsers AFAIK.  (Checked checked FF3, IE6,
> Safari3win, Opera9.)  I think one has to be careful to do things like
> this:
>
> function(){ return "</scr" + "ipt>" }
>
> ...to avoid the HTML parser ending the script early.

Ah, silly me. That explains why I couldn't figure out how to work
around it : )

> --
> T.J. Crowder
> tj / crowder software / com

[...]

--
kangax
--~--~---------~--~----~------------~-------~--~----~
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