/[suikacvs]/www/test/dom/ns/prefix-attr-empty.html
Suika

Contents of /www/test/dom/ns/prefix-attr-empty.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download) (as text)
Wed Mar 22 04:28:42 2006 UTC (19 years, 3 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/html
New tests

1 wakaba 1.1 <!DOCTYPE html>
2     <html lang="en">
3     <head>
4     <title>Attr.prefix = ''</title>
5     </head>
6     <body>
7     <h1><code><var>Attr</var>.prefix = ''</code></h1>
8    
9     <p>Result: <span id="result">NOT EXECUTED</span></p>
10    
11     <script>
12     window.onload = function () {
13     var result = document.getElementById ('result');
14     result.firstChild.data = 'FAILED';
15    
16     var el = document.createAttributeNS ('http://www.dom.test/', 'dom:test');
17     el.prefix = '';
18    
19     var newPrefix = el.prefix;
20     if (newPrefix == null) {
21     result.firstChild.data = '(null)';
22     } else if (newPrefix == '') {
23     result.firstChild.data = '(empty)';
24     } else if (newPrefix == 'dom') {
25     result.firstChild.data = '(as is)';
26     } else {
27     result.firstChild.data = newPrefix;
28     }
29     };
30     </script>
31    
32     <p>Setting the empty string as the namespace prefix of a node
33     is implementation dependent in DOM Level 3 Core.</p>
34    
35     </body>
36     </html>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24