couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject [8/8] git commit: updated refs/heads/master to 947d116
Date Sun, 19 May 2013 11:31:25 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/947d116b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/947d116b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/947d116b

Branch: refs/heads/master
Commit: 947d116b38296d0551a3956227e65bb854be7b51
Parents: 55395eb
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:30:54 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/947d116b/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