Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /eventsource/eventsource-onmessage.any.html - WPT Dashboard Interop Dashboard
- /eventsource/eventsource-onmessage.any.worker.html - WPT Dashboard Interop Dashboard
// META: title=EventSource: onmessage
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()
}
})