Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

jsonp script loading error handling #387

Closed
wants to merge 1 commit into from

1 participant

@mrniko

We should handle error if jsonp init request fails

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 14, 2012
  1. jsonp script loading error handling

    Nikita authored
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/socket.js
View
4 lib/socket.js
@@ -140,6 +140,10 @@
script.src = url + '&jsonp=' + io.j.length;
insertAt.parentNode.insertBefore(script, insertAt);
+ script.onerror = function() {
+ self.onError();
+ };
+
io.j.push(function (data) {
complete(data);
script.parentNode.removeChild(script);
Something went wrong with that request. Please try again.