W3C home > Mailing lists > Public > www-style@w3.org > May 2014

RE: why not MediaQueryList.onchange

From: François REMY <francois.remy.dev@outlook.com>
Date: Mon, 19 May 2014 14:39:00 +0200
Message-ID: <DUB404-EAS381846C91561C640BB11549A5320@phx.gbl>
To: "'Tab Atkins Jr.'" <jackalmage@gmail.com>, "'Jochen Eisinger'" <eisinger@google.com>
CC: "'www-style list'" <www-style@w3.org>
± > 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()

Does it include the "mq.onchange" property?
Received on Monday, 19 May 2014 12:39:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:42 UTC