eventsource-url.js (225B)
1 onconnect = function(e) { 2 try { 3 var port = e.ports[0] 4 var source = new EventSource("../resources/message.py") 5 port.postMessage([true, source.url]) 6 source.close() 7 } catch(e) { 8 port.postMessage([false, String(e)]) 9 } 10 }