Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /eventsource/request-accept.any.html - WPT Dashboard Interop Dashboard
- /eventsource/request-accept.any.worker.html - WPT Dashboard Interop Dashboard
// META: title=EventSource: Accept header
var test = async_test()
test.step(function() {
var source = new EventSource("resources/accept.event_stream?pipe=sub")
source.onmessage = function(e) {
test.step(function() {
assert_equals(e.data, "text/event-stream")
this.close()
}, this)
test.done()
}
})