https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 2762f9e510988a8a9936fe8049d0f9ea2ba87be2 authored by James Graham on 30 July 2018, 13:36:45 UTC
Add a directory handler that uses the MANIFEST.json for listings.
Tip revision: 2762f9e
eventsource-onmessage.htm
<!DOCTYPE html>
<html>
  <head>
    <title>EventSource: onmessage</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 source = new EventSource("resources/message.py")
        source.onmessage = function(e) {
          test.step(function() {
            assert_equals("data", e.data)
            source.close()
          })
          test.done()
        }
      })
    </script>
  </body>
</html>

back to top