W3C home > Mailing lists > Public > www-style@w3.org > June 2013

Re: [cssom] Constructor for MediaList

From: Simon Pieters <simonp@opera.com>
Date: Tue, 25 Jun 2013 08:46:14 +0200
To: "Glenn Adams" <glenn@skynav.com>, "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <op.wy72fctaidj3kv@simons-macbook-pro.local>
On Mon, 24 Jun 2013 16:21:22 +0200, Glenn Adams <glenn@skynav.com> 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. <jackalmage@gmail.com>  

> 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.

sheet.media = new MediaList("...");


sheet.media.mediaText = "...";

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

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