Note: As far as I can tell, this feature is only supported by Firefox today...

For a more widely-implemented alternative, you could try:
<code><pre>interface StyleSheet {
  ...
   [SameObject, PutForwards=mediaText] readonly attribute MediaList media;
  ...
};</pre><code>