tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

format-field-event.any.js (556B)


      1 // META: title=EventSource: custom event name
      2      var test = async_test(),
      3          dispatchedtest = false
      4      test.step(function() {
      5        var source = new EventSource("resources/message.py?message=event%3Atest%0Adata%3Ax%0A%0Adata%3Ax")
      6        source.addEventListener("test", function() { test.step(function() { dispatchedtest = true }) }, false)
      7        source.onmessage = function() {
      8          test.step(function() {
      9            assert_true(dispatchedtest)
     10            this.close()
     11          }, this)
     12          test.done()
     13        }
     14      })