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

[CSSOM View] MediaQueryList as EventTarget

From: Dean Jackson <dino@apple.com>
Date: Thu, 14 Jun 2012 18:25:00 -0700
Message-id: <A623DDD4-807B-44BE-80D6-CD0E36629BC7@apple.com>
Cc: Anne van Kesteren <annevk@opera.com>
To: www-style list <www-style@w3.org>
The MediaQueryList interface has addListener and removeListener methods, that each take a MediaQueryListListener (which is a pretty cool name when you think about it).

MediaQueryListListener has a single handleChange() method.

Is there a good reason why MediaQueryList isn't just an EventTarget? It makes more sense to me, and would allow you to have a single controller object to implement handleEvent for all your code. As it currently stands, it is a weird handleChange method.

Received on Friday, 15 June 2012 01:25:29 UTC

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