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.

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2363

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

OK.

On Mon, 24 Jun 2013 17:54:49 +0200, Tab Atkins Jr. <jackalmage@gmail.com>  
wrote:

> 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("...");

vs.

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

I removed the constructor.

https://dvcs.w3.org/hg/csswg/rev/e76dc8c8b061


> 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.3.1 : Monday, 2 May 2016 14:39:12 UTC