summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/eventsource/shared-worker/eventsource-url.js
blob: 491dbac33320d99b714747c864ca2b42467c0b57 (plain)
1
2
3
4
5
6
7
8
9
10
onconnect = function(e) {
try {
  var port = e.ports[0]
  var source = new EventSource("../resources/message.py")
  port.postMessage([true, source.url])
  source.close()
} catch(e) {
  port.postMessage([false, String(e)])
}
}