Wrap JS response in an anonymous function.

@gjvis good point, thank you