Hi Tobie,

> That's actually incorrect.

Thanks! It struck me as odd but I figured I was just misremembering,
because I was drawing on the docs for that answer -- and they say[1]
`evalJS` controls JSON eval:

<< evalJS (Boolean | String; default true): Automatically evals the
content of Ajax.Response#responseText and populates
Ajax.Response#responseJSON with it if the Content-type returned by the
server is set to application/json. If the request doesn't obey same-
origin policy, the content is sanitized before evaluation. If you need
to force evalutation, pass 'force'. To prevent it altogether, pass
false. >>

That looks like it's kind of a mashed-together version of the two of
them.

I've double-checked the source, and it seems at a glance that
(unsurprisingly!) you're right, so I've filed a ticket[2] in
Lighthouse about it.

[1] http://api.prototypejs.org/ajax/
[2] 
https://prototype.lighthouseapp.com/projects/42103-prototype-documentation/tickets/162

-- T.J.

On May 18, 1:44 pm, Tobie Langel <tobie.lan...@gmail.com> wrote:
> > `evalJS` tells Prototype not to evaluate JSON, not scripts.
>
> That's actually incorrect.
>
> - `evalJSON` controls the evaluation of JSON data,
> - `evalJS` of JavaScript programs served through xhr, and
> - `evalScripts` of the content of script tags found in the
> responseText property of the xhr object.
>
> Best,
>
> Tobie
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Prototype & script.aculo.us" group.
> To post to this group, send email to prototype-scriptacul...@googlegroups.com.
> To unsubscribe from this group, send email to 
> prototype-scriptaculous+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to