W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

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

From: Bryan Sullivan <blsaws@gmail.com>
Date: Thu, 8 Sep 2011 12:24:06 -0700
Message-ID: <CAA2gsfoGdzs9nBQFR7XdKOKMZ6EMHxDxN4QB=daPyoJTo+f_6w@mail.gmail.com>
To: public-webapps@w3.org
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:47 GMT