summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/eventsource/dedicated-worker/eventsource-onopen.js
blob: 72a1053263040b94653d9d2090b00c999c599c24 (plain)
1
2
3
4
5
6
7
8
9
try {
  var source = new EventSource("../resources/message.py")
  source.onopen = function(e) {
    postMessage([true, source.readyState, 'data' in e, e.bubbles, e.cancelable])
    this.close()
  }
} catch(e) {
  postMessage([false, String(e)])
}