Re: [cssom] appendMedium() and ensuring uniqueness

On Sat, 23 Jul 2011 15:28:50 -0700, L. David Baron <dbaron@dbaron.org>  
wrote:
> I'm not so convinced that ensuring uniqueness is a good thing.  It
> requires extra complexity in browsers -- it's the only thing that
> requires the definition of "comparison of media queries" in the
> cssom spec.  And it's not clear to me that it's good for authors,
> and I could certainly imagine it being confusing to authors.

So I almost made this change, but I noticed deleteMedium() relies on the  
"compare media queries" algorithm as well. How would deleteMedium() work  
if we no longer had that?


> A quick test at
> http://lists.w3.org/Archives/Public/www-archive/2011Jul/att-0022/appendMedium.html
> shows that Gecko and Opera follow DOM-Level-2-Style (not cssom),
> while WebKit doesn't ensure uniqueness at all.

The way I specified it does match addEventListener() and  
MediaQueryList.addListener(). By not adding if it is already there.


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

Received on Wednesday, 27 July 2011 23:59:11 UTC