W3C home > Mailing lists > Public > www-style@w3.org > June 2012

Re: [CSSOM View] MediaQueryList as EventTarget

From: Glenn Adams <glenn@skynav.com>
Date: Thu, 14 Jun 2012 21:15:19 -0600
Message-ID: <CACQ=j+f9Kj7-+zD2RF74W_fOzwoQM+165uQLdDK__LufO2NR8A@mail.gmail.com>
To: Dean Jackson <dino@apple.com>
Cc: www-style list <www-style@w3.org>, Anne van Kesteren <annevk@opera.com>
On Thu, Jun 14, 2012 at 7:25 PM, Dean Jackson <dino@apple.com> wrote:

> The MediaQueryList interface has addListener and removeListener methods,
> that each take a MediaQueryListListener (which is a pretty cool name when
> you think about it).
>
> MediaQueryListListener has a single handleChange() method.
>
> Is there a good reason why MediaQueryList isn't just an EventTarget? It
> makes more sense to me, and would allow you to have a single controller
> object to implement handleEvent for all your code. As it currently stands,
> it is a weird handleChange method.


There is no DOM-2 Style legacy requirement on this interface, so it would
only [potentially] depend on early, experimental implementations of this
interface that might break on a change. Personally, I would support using
EventTarget for consistency as you suggest. Any comments [by others]?

BTW, the current ED for CSSOM View is at [1]. Anne is no longer the editor.

[1] http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom-view/Overview.html
Received on Friday, 15 June 2012 03:16:10 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:55 GMT