3 <title>CSS3 media query test: stylesheet media.appendMedium
</title>
4 <link rel=
"help" href=
"http://www.w3.org/TR/css3-mediaqueries/#syntax" />
5 <link rel=
"help" href=
"http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html" />
6 <style type=
"text/css" media=
"braille, not screen">
10 <script language=
"javascript">
12 var re
= document
.getElementById("result");
13 var media
= document
.styleSheets
[0].media
;
14 media
.appendMedium("screen and (color)");
15 media
.appendMedium("not screen");
17 for (var i
= 0; i
< media
.length
; ++i
) {
18 if (!first
) re
.innerHTML
+= ", " + media
.item(i
);
19 else re
.innerHTML
= media
.item(i
);
27 <body onload=
"test()">
28 <!-- FIXME: NOTE! This will fail until dynamic setting of media property causes style recalculation.
29 This is not the case currently (24.07.2005)
31 <p> This text should be green and below should read
"braille, not screen, screen and (color)".
</p>
32 <p id=
"result">Failure: test not run
</p>