W3C home > Mailing lists > Public > www-style@w3.org > July 2011

Re: [cssom] appendMedium() and ensuring uniqueness

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 27 Jul 2011 16:58:26 -0700
To: www-style@w3.org, "L. David Baron" <dbaron@dbaron.org>
Message-ID: <op.vzax7p1964w2qv@42-2-187-074.static.netvigator.com>
On Sat, 23 Jul 2011 15:28:50 -0700, L. David Baron <dbaron@dbaron.org>  
> 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
Received on Wednesday, 27 July 2011 23:59:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:02 UTC