- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 19 May 2014 21:13:48 +0900
- To: Jochen Eisinger <eisinger@google.com>
- Cc: www-style list <www-style@w3.org>
On Tue, Apr 1, 2014 at 5:51 AM, Jochen Eisinger <eisinger@google.com> wrote: > Hey, > > I wonder why MediaQueryList defines its own listener interface > (MediaQueryListListener) instead of just defining an change event on the > MediaQueryList itself? > > The reason I ask is because MediaQueryListListener is a pretty unique > snowflake in the web exposed APIs which makes it very costly to implement > and somewhat unintuitive to use. The CSSWG resolved today to do what this thread suggests: * make MediaQueryList an EventTarget * fire a non-bubbling "change" event at it whenever things change * alias the existing addListener(...) to addEventListener("change", ...); same with removeListener() ~TJ
Received on Monday, 19 May 2014 12:14:36 UTC