Git Repository Public Repository

namibia

URLs

Copy to Clipboard
 
df0489e1eeeeab5a9bd44e1d84fce49924fe1bac
1
2
3
4
5
6
7
8
9
10
11
12
/* Notice : This class in only intended to be use as an implemented class */
APE.Request.SSE = new Class({
	SSESupport: ((typeof window.addEventStream) == 'function'), 

	initSSE: function(queryString, options, readCallback) {
		var tmp = document.createElement('div');
		document.body.appendChild(tmp);
		tmp.innerHTML = '<event-source src="' + this.ape.serverUri + queryString + '&' + $time() + '" id="APE_SSE">';
		this.eventSource = document.getElementById('APE_SSE');
		this.eventSource.addEventListener('ape-data', function(ev) { readCallback.run(ev.data) }, false);
	}
});

Commits for namibiapublic/ape-source/Transport/Transport.SSE.js

Diff revisions: vs.
Revision Author Commited Message
df0489 ... Mark Fri 14 Oct, 2016 10:01:00 +0000

initial commit