/[suikacvs]/www/test/dom/node/local-name/dom1-element-local-name-4.xhtml
Suika

Contents of /www/test/dom/node/local-name/dom1-element-local-name-4.xhtml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Fri Jun 15 15:30:19 2007 UTC (17 years, 10 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
Firefox 1.5: uppercase in HTML, otherwise as is; Opera 9: as is

1 wakaba 1.1 <html xmlns="http://www.w3.org/1999/xhtml">
2     <head>
3     <title>createElement ().localName</title>
4     </head>
5     <body>
6     <p id="result">FAIL (not executed)</p>
7     <script type="text/javascript">
8     var result = document.getElementById ('result');
9     result.firstChild.data = 'FAIL';
10     var el = document.createElement ('prefix:elementName');
11     if (typeof (el.localName) == 'undefined') {
12     result.firstChild.data = 'FAIL (undefined)';
13     } else if (el.localName == null) {
14     result.firstChild.data = 'PASS (as per DOM3)';
15     } else if (el.localName == 'prefix:elementname') {
16     result.firstChild.data = 'FAIL (lowercase)';
17     } else if (el.localName == 'prefix:elementName') {
18     result.firstChild.data = 'FAIL (as is)';
19     } else if (el.localName == 'PREFIX:ELEMENTNAME') {
20     result.firstChild.data = 'FAIL (uppercase)';
21     } else {
22     result.firstChild.data = 'FAIL';
23     }
24     </script>
25     </body>
26     </html>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24