[EventSource] Is the field name "event" supported in current browsers?

Hi all,

I am trying to develop a test for eventsource, and am finding that when I
include an "event" field in an eventsource stream, the onmessage events are
never fired (if I don't send the "event" field, just "data" fields, the
events *are* fired). This occurs in FF, Safari, and Chrome (latest end-user
versions).

The EventSource spec is not really clear on this (there is no example that
shows an event field). If anyone is familiar with what should be supported,
please let me know if the following expectation is correct:

The event stream below should result in a message event being fired, with
event.type set to "time" and event.data set to "Thu, 08 Sep 11 13:20:41
-0600":

event: time
data: Thu, 08 Sep 11 13:20:41 -0600
(blank line)

Is this understanding correct?

My test is at: http://test.bkaj.net/webapi/server-sent-events

Thanks,
Bryan

Received on Thursday, 8 September 2011 19:24:34 UTC