blob: f5e2c898df0cdacb7da29e84858abef4eb6f2ad7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
onconnect = function(e) {
try {
var port = e.ports[0]
var source = new EventSource("../resources/message.py")
source.onmessage = function(e) {
port.postMessage([true, e.data])
this.close()
}
} catch(e) {
port.postMessage([false, String(e)])
}
}
|