diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-01-30 23:19:43 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-01-30 23:19:58 +0100 |
commit | 6a1121ab2e91a362ed1e13e18c44fca40761f97a (patch) | |
tree | 6856935e903f221a249f95ebd14a262aed5bf98c /core/js/eventsource.js | |
parent | e0f655fb707e1c632602319a6b989e8f58866953 (diff) | |
download | nextcloud-server-6a1121ab2e91a362ed1e13e18c44fca40761f97a.tar.gz nextcloud-server-6a1121ab2e91a362ed1e13e18c44fca40761f97a.zip |
provide server side close option for EventStream
Diffstat (limited to 'core/js/eventsource.js')
-rw-r--r-- | core/js/eventsource.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/js/eventsource.js b/core/js/eventsource.js index 422f97657bd..30b942f59e8 100644 --- a/core/js/eventsource.js +++ b/core/js/eventsource.js @@ -44,8 +44,13 @@ OC.EventSource=function(src){ $('body').append(this.iframe); this.useFallBack=true; OC.EventSource.iframeCount++ - } + //add close listener + this.listen('__internal__',function(data){ + if(data=='close'){ + this.close(); + } + }.bind(this)); } OC.EventSource.fallBackSources=[]; OC.EventSource.iframeCount=0;//number of fallback iframes |