Re: MediaQueryList event

On Mon, Jun 9, 2014 at 7:02 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> MQL used callbacks in a trivial way that looked exactly like events,
> except they weren't, and because of that there were trivial
> incompatibilities with specific details of the event system in
> general.  We're just fixing that by switching over to actually using
> an event.  Are you suggesting that we should have instead kept MQL
> with a custom callback system that instead more carefully aped event
> semantics?

Yes.


> This makes MQL an EventTarget, yes, but I don't see that as adding
> complication - can you elaborate on your concern?  It is now
> technically possible to add a listener in two ways (the legacy
> `mql.addListener(cb)` and `mql.addEventListener("change", cb)`), but
> that's just us covering the legacy case, and I don't see it as a big
> deal.

I don't see a big need to add that API surface area.


-- 
http://annevankesteren.nl/

Received on Monday, 9 June 2014 17:46:13 UTC