Revision 3054fb1e208e4384fc86e818dc2185dcf338e924 authored by Matt Wolenetz on 06 September 2016, 22:54:41 UTC, committed by Matt Wolenetz on 06 September 2016, 22:54:41 UTC
2 parent s a882c22 + 2442751
Raw File
eventsource-prototype.htm
<!--
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)])
}
/*-->
<!DoCtYpE hTMl>
<html>
  <heAd>
    <title>dedicated worker - EventSource: prototype et al</tiTle>
    <scrIpt src="/resources/testharness.js"></scripT>
    <scriPt src="/resources/testharnessreport.js"></Script>
  </heaD>
  <boDy>
    <diV iD="log"></Div>
    <sCript>
      var test = async_test();
      test.step(function() {
        var worker = new Worker('#')
        worker.onmessage = function(e) {
          test.step(function() {
            assert_true(e.data[0], e.data[1])
            assert_true(e.data[1], 'source.ReturnTrue()')
            assert_true(e.data[2], "'EventSource' in self")
          })
          test.done()
        }
      })
    </scrIpt>
  </bOdy>
</htMl>
<!--*/ //-->
back to top