Re: [cssom-view] addMediumListener / removeMediumListener

On Wed, 26 May 2010 16:07:06 +0200, Luiz Agostini  
<luiz.agostini@openbossa.org> wrote:
> Is there any compelling reasons to not accept media query lists?

I mainly did it for consistency with matchMedium() which in turn was based  
on appendMedium() and all.


> A useful notification may be related to a list and not to a specific  
> query.
> For example I could have
>
> @media (min-width: 300px), (orientation:landscape) {
>     body {background-color: red}
> }
>
> and be interested on receiving a callback when the background color of  
> the body changes. It is of course possible to make it just having  
> callbacks to each query but having a callback to the list would make it  
> somewhat easier.
>
> On a side note, the matchMedium implementation in WebKit accepts media  
> query lists, is that to be considered a bug?

I guess it makes sense if they both accept lists of media queries, but  
then the name is somewhat wrong and out of line with appendMedium().  
(Though we could change that one too.)


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Wednesday, 26 May 2010 14:13:51 UTC