Skip to content

Commit e04f954

Browse files
committed
Add 'timeout' handler for the html backend
1 parent b0b7dfc commit e04f954

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

platform/html5/html.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -894,8 +894,10 @@ exports.ajax = function(ui, request) {
894894
if (request.withCredentials !== undefined)
895895
xhr.withCredentials = request.withCredentials
896896

897-
if (error)
897+
if (error) {
898898
xhr.addEventListener('error', error)
899+
xhr.addEventListener('timeout', error)
900+
}
899901

900902
if (done)
901903
xhr.addEventListener('load', done)

0 commit comments

Comments
 (0)