gpt4 book ai didi

sproutcore - notify()在IE8中不起作用

转载 作者:行者123 更新时间:2023-12-03 13:38:44 28 4
gpt4 key购买 nike

我正在基于Sproutcore 1.9.1的Web应用程序上工作。要从服务器检索数据
发出一个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.

最佳答案

至少在SC master上,此问题是已知的(https://github.com/sproutcore/sproutcore/issues/866),并且似乎已解决。

附带说明一下,您包括查询并将其作为.notify()的参数存储在对象中。您不需要这样做,您可以简单地将它们作为额外的参数包含在内,您的notify函数将使用这些额外的参数进行调用:

.notify(this,this.notifier,query,store)

以及文件中的其他位置:
notifier: function(result,query,store){ }

关于sproutcore - notify()在IE8中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15515252/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com