You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I set a JSONP callback to my JSON view model, the returned mime type is application/json instead of application/javascript. This is due to the JsonStrategy which checks if the JsonRenderer has a JSONP callback to switch the mime type. But the JsonRenderer doesn't have a JSONP callback, only my view model has one.
As a workaround, I now set the callback to the renderer ($this->getServiceLocator()->get('ViewJsonRenderer')->setJsonpCallback($callback);).
If I set a JSONP callback to my JSON view model, the returned mime type is
application/json
instead ofapplication/javascript
. This is due to the JsonStrategy which checks if the JsonRenderer has a JSONP callback to switch the mime type. But the JsonRenderer doesn't have a JSONP callback, only my view model has one.As a workaround, I now set the callback to the renderer (
$this->getServiceLocator()->get('ViewJsonRenderer')->setJsonpCallback($callback);
).Originally posted by @rohm1 at zendframework/zend-view#41
The text was updated successfully, but these errors were encountered: