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

Re: why not MediaQueryList.onchange

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 06 Jun 2014 10:59:50 -0400
Message-ID: <5391D766.9040804@mit.edu>
To: www-style@w3.org
On 6/6/14, 5:20 AM, Simon Pieters wrote:
> I looked into changing this in the spec and noticed that this would
> change the argument of the callback from the MediaQueryList object to
> the event, which is potentially a Web compat problem.

One way to deal with that, perhaps, is to say that addListener behaves 
similar to event handlers: the thing passed in is not what's added as 
the event listener, and the actual event listener invokes the thing 
passed in in whatever way it's expected.  Duplicate handling would need 
to be defined carefully.

This is a bit more of a pain to specify and implement, of course.

-Boris
Received on Friday, 6 June 2014 15:00:19 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:22 UTC