2013-03-20 3 views
0

Я работаю над веб-приложением на основе Sproutcore 1.9.1. Чтобы получить данные с сервера, он выполняет запрос SC.Request.getUrl(), который отлично работает во всех браузерах, кроме IE8. Для IE8, когда запрос, как это:notify() не работает в 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

Эта проблема известна (https://github.com/sproutcore/sproutcore/issues/866) и, как представляется, фиксированной, по крайней мере, на мастер SC.

В качестве примечания стороны вы включаете запрос и сохраняете в объекте в качестве параметра для .notify(). Вам не нужно делать это, вы можете просто включить их в качестве дополнительных параметров и ваша функция уведомит будет вызываться с этими дополнительными параметрами:

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

и где-либо еще в файле:

notifier: function(result,query,store){ } 
Смежные вопросы