Re: why not MediaQueryList.onchange

On Mon, Mar 31, 2014 at 1:51 PM, 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.

Wow, I hadn't realized how bad that was.

Yeah, we should fire a "change" event or something on it, and define
addListener(...) as just calling addEventListener("change", ...) (and
similarly with removeListener).

~TJ

Received on Monday, 31 March 2014 21:08:26 UTC

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant