Re: [CSSOM View] MediaQueryList as EventTarget

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 UTC