/[suikacvs]/www/test/dom/element/set-attr/html/style/valid-then-invalid-1.html
Suika

Contents of /www/test/dom/element/set-attr/html/style/valid-then-invalid-1.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download) (as text)
Sun Dec 16 05:46:19 2007 UTC (18 years, 6 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/html
New tests; see SuikaWiki:style for result

1 wakaba 1.1 <!DOCTYPE HTML>
2     <html>
3     <head>
4     <title>.setAtribute ('style', valid-css) then .setAttribute ('style', invalid-css)</title>
5     </head>
6     <body>
7     <p id=result class=FAIL>FAIL (noscript)</p>
8     <p id=test></p>
9     <script>
10     var r = document.getElementById ('result');
11     r.firstChild.data = 'FAIL (script error)';
12     var t = document.getElementById ('test');
13     t.setAttribute ('style', 'display: none;');
14     t.setAttribute ('style', 'invalid css');
15     var v = t.getAttribute ('style');
16     if (v == 'invalid css') {
17     r.firstChild.data = 'PASS';
18     r.className = 'PASS';
19     } else {
20     r.firstChild.data = 'FAIL (' + typeof (v) + ', ' + v + ')';
21     }
22     </script>
23     </body>
24     </html>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.24