prototypejs / prototype

Prototype JavaScript framework
http://prototypejs.org/
Other
3.53k stars 639 forks source link

Ajax.activeRequestCount doesn't decrease when error in onComplete callback #324

Closed jalgaba closed 7 years ago

jalgaba commented 7 years ago
new Ajax.Request('/ajax,html',
{
    onComplete: function () {
        ({}).abc.xyz; //Error on purpose. but nothing reported to browser console
        console.log('This message never logs.');
    }
});
//All ajax finished, but Ajax.activeRequestCount is stuck at "1"

Not only that. But the browser console doesn't show any error/warning. My current workaround is wrapping all the callback's content in a try-catch and reporting the error to the console myself.

Using 1.7.3 Tested Chrome 54 and Firefox 52