我正在开发基于Sproutcore 1.9.1的网络应用程序。从服务器检索数据 发出一个SC.Request.getUrl()请求,它在除IE8之外的所有浏览器中都能正常工作。 对于IE8,请求是这样的:
SC.Request.getUrl("'http://example.com/some/path')
.set('isJSON', YES)
.async(false) // made async false to work in IE
.notify(this, 'someMethodDidComplete', { query: query, store: store})
.send();
works fine. But when the request is :
SC.Request.getUrl("'http://example.com/some/path')
.set('isJSON', YES)
.notify(this, 'someMethodDidComplete', { query: query, store: store})
.send();
it works fine for other browsers but for IE8, it is not working. After spending some
time with the issue i found out that the finishrequest() is not invoking. For doing so
what I did is made 'asynchronous false' and then it works. Now I don't know what to do.
Please suggest me something on this and why normal request is not working.
thanks in advance.
答案 0 :(得分:0)
这个问题已知(https://github.com/sproutcore/sproutcore/issues/866)并且似乎已得到解决,至少在SC大师身上是这样。
作为旁注,您将查询和存储在对象中作为.notify()的参数。您不需要这样做,您只需将它们作为额外参数包含在内,并使用这些额外参数调用您的通知函数:
.notify(this,this.notifier,query,store)
以及文件中的其他位置:
notifier: function(result,query,store){ }