No, I DON'T want it to be in global scope.

I want it to be in the scope of where I called Ajax.Request.  The way
auto eval works right now, it can create a lot of scope pollution.

Right now, it does make things global.

- Omega

On Jun 6, 1:41 pm, tobie <[EMAIL PROTECTED]> wrote:
> > Situation & problem:
>
> > I'm returning a lot of pure javascript in my responses and I have one
> > particular case where I'd like the headers to remain "application/
> > javascript", but for Prototype to NOT automatically evaulate the code,
> > and just provide it to me so I can eval it myself?
>
> That's planned (seehttp://dev.rubyonrails.org/ticket/8391)
>
> > Reason being:
>
> > I've noticed that when prototypes Ajax.Request auto-evals, it does it
> > at the highest point in the scope chain, rather than where it was
> > instantiated.
>
> > An alternate solution:
> > Maybe there's a way of controlling the scope of the automatic eval
> > prototype does?
>
> Partially. If you want to set things in the global scope do it like
> so:
>
> window.bla = 'foo'; (instead of var bla = 'foo')


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to