/[suikacvs]/www/test/dom/node/local-name/dom1-element-local-name-1.html
Suika

Contents of /www/test/dom/node/local-name/dom1-element-local-name-1.html

Parent Directory Parent Directory | Revision Log Revision Log


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

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24