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