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