You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by dj...@apache.org on 2013/05/19 13:31:21 UTC

[4/8] git commit: updated refs/heads/1.3.x to f31f608

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 <dj...@apache.org>
Authored: Sun May 19 13:29:59 2013 +0200
Committer: Dirkjan Ochtman <dj...@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);