- From: Simon Sapin <simon.sapin@exyr.org>
- Date: Wed, 26 Jun 2013 12:22:23 +0100
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- CC: Simon Pieters <simonp@opera.com>, Glenn Adams <glenn@skynav.com>, "www-style@w3.org" <www-style@w3.org>
Le 25/06/2013 18:42, Tab Atkins Jr. a écrit : > Instead, we can directly address this by allowing the value of a > custom MQ to be set to a MediaList, with the meaning being that it has > the same truth value as the contained MQs: > > <script> > document.css.customMedia.set("foo", new MediaList("(foo:bar) and (baz:qux)")); > </script> > <style> > @media "foo" { > ... > } > </style> Why is a constructor needed instead of just a string? document.css.customMedia.set("foo", "(foo:bar) and (baz:qux)"); -- Simon Sapin
Received on Wednesday, 26 June 2013 11:22:51 UTC