eventsource-eventtarget.any.js (407B)
1 // META: title=EventSource: addEventListener() 2 3 var test = async_test() 4 test.step(function() { 5 var source = new EventSource("resources/message.py") 6 source.addEventListener("message", listener, false) 7 }) 8 function listener(e) { 9 test.step(function() { 10 assert_equals("data", e.data) 11 this.close() 12 }, this) 13 test.done() 14 }