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 12:13:23 -0700
Message-ID: <CAA2gsfq-UQpEwrACHVpAAC1up6=4=2BR46Bh9qMXav=PA6mM5A@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: public-webapps@w3.org
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

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).


On Thu, Sep 8, 2011 at 11:46 AM, Glenn Maynard <glenn@zewt.org> wrote:

> On Thu, Sep 8, 2011 at 1:56 PM, Bryan Sullivan <blsaws@gmail.com> wrote:
>> Thanks for the help.
>> So when you say "the name of the event", how in JavaScript do I access the
>> name of the event, e.g. to test it? Accessing  the data (event.data) works,
>> but how do access the name?
> The type (or name) of the event is the first parameter to
> addEventListener.  It's also available with event.type, if you use the same
> function for several listeners.
> --
> Glenn Maynard
Received on Thursday, 8 September 2011 19:13:50 UTC

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