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

Re: [EventSource] Question on event type

From: Bryan Sullivan <blsaws@gmail.com>
Date: Thu, 8 Sep 2011 13:00:11 -0700
Message-ID: <CAA2gsfoQkK1WJu8u_Dm743p4cOPng1OfHM29T7c_1RrpuE95vA@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: public-webapps@w3.org
OK, maybe I'm getting closer to understanding this. From your example, when
the "event" field is set, it's not a "message" event that is dispatched but
an event of type "event name", so in order to see those events, I need to
use the addEventListener interface for the eventsource object (they will not
be delivered via the onmessage handler).

I modified my test to use that explanation and it does work. It would be
really great for the eventsource spec to have an example that explains this.

Thanks a lot for your explanation and example. Sorry for the newbie-ish

On Thu, Sep 8, 2011 at 12:28 PM, Glenn Maynard <glenn@zewt.org> wrote:

> On Thu, Sep 8, 2011 at 3:13 PM, Bryan Sullivan <blsaws@gmail.com> wrote:
>> That would seem to be the obvious way to access it, but does not seem to
>> be working for current implementations of eventsource. That's why I was
>> unsure of how to access it. I guess there are some other issues at hand
>> here. I need to figure out what they are first, and will start another
>> thread for that.
> It works for me in Chrome 13.  https://zewt.org/~glenn/event-source2.html
>> It would very helpful if the spec was clearer on how to access the event
>> type. I don't see this anywhere in the referenced DOM Events spec or HTML5
>> (or the "living standard" version).
> See
> http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-event-typeand
> http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#event-types
> .
> --
> Glenn Maynard
Received on Thursday, 8 September 2011 20:00:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:23 UTC