[CSSOM View] MediaQueryList as EventTarget

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.

Dean

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