Sha256: 2059cd6af83798c5867652249de2112c8e62a7a4080bf80b2e79073ad28641cc
Contents?: true
Size: 577 Bytes
Versions: 10
Compression:
Stored size: 577 Bytes
Contents
// console.log("Loading TopBar...") Spontaneous.EventSource = (function($, S) { var EventSource = new JS.Singleton({ eventSource: function() { if (!this._eventSource) { this._eventSource = new window.EventSource(S.Ajax.request_url('/events', true)); } return this._eventSource; }, addEventListener: function(event, callback) { this.eventSource().addEventListener(event, callback); }, removeEventListener: function(event, callback) { this.eventSource().removeEventListener(event, callback); } }); return EventSource; })(jQuery, Spontaneous);
Version data entries
10 entries across 10 versions & 1 rubygems