Re: [cssom] Constructor for MediaList

On Mon, 24 Jun 2013 16:21:22 +0200, Glenn Adams <> wrote:

> btw, lack of support for this constructor was a minor impediment to
> creating tests in the recent Tokyo TTWF, at least until I pointed out  
> that
> one simply needed to create them indirectly by specifying a @media rule  
> in
> a style sheet;

Or just create a stylesheet.

> but yes, I don't see any place to use a MediaList once
> constructed;


On Mon, 24 Jun 2013 17:54:49 +0200, Tab Atkins Jr. <>  

> It does look like it can't currently be used for anything.  An obvious
> use for it would be to allow it to be assigned to .media directly,
> rather than having to go through text first.

That wouldn't enable anything that can't already be done, though. It also  
doesn't really seem more convenient. = new MediaList("...");

vs. = "...";

I removed the constructor.

> Another use (possibly what prompted you to look into this?) is in
> custom MQs, where it could be useful to represent an MQ alias, rather
> than a purely custom one.

Can you elaborate on this?

Simon Pieters
Opera Software

Received on Tuesday, 25 June 2013 06:44:35 UTC