couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject [4/8] git commit: updated refs/heads/1.3.x to f31f608
Date Sun, 19 May 2013 11:31:21 GMT
docs: add error handling code to EventSource example


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/f31f608e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/f31f608e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/f31f608e

Branch: refs/heads/1.3.x
Commit: f31f608ede758b36c5c2ee338c9fb31234136f68
Parents: 7acfc5b
Author: Dirkjan Ochtman <djc@apache.org>
Authored: Sun May 19 13:29:59 2013 +0200
Committer: Dirkjan Ochtman <djc@apache.org>
Committed: Sun May 19 13:29:59 2013 +0200

----------------------------------------------------------------------
 share/doc/src/changes.rst |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/f31f608e/share/doc/src/changes.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/changes.rst b/share/doc/src/changes.rst
index fbfb0c3..f806559 100644
--- a/share/doc/src/changes.rst
+++ b/share/doc/src/changes.rst
@@ -199,6 +199,10 @@ specification`_ for further details.
     if (window.EventSource) {
 
       var source = new EventSource("/somedatabase/_changes?feed=eventsource");
+      source.onerror = function(e) {
+        alert('EventSource failed.');
+      };
+      
       var results = [];
       var sourceListener = function(e) {
         var data = JSON.parse(e.data);


Mime
View raw message