OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="../../js/resources/js-test-pre.js"></script> | |
5 <script src="resources/microdata-common.js"></script> | |
6 </head> | |
7 <body> | |
8 <p>Properties collection's namedItem property simple test.</p> | |
9 <div id="console"></div> | |
10 <script> | |
11 var element = createElement('div', {itemscope: 'itemscope'}, '<div itemprop="foo
"></div>'); | |
12 | |
13 debug("<br>Test properties.namedItem(name)."); | |
14 shouldBeDefined("element.properties.namedItem('foo')"); | |
15 shouldBe("element.properties.namedItem('foo').length", '1'); | |
16 shouldBe("element.properties.namedItem('foo')[0]", 'element.firstChild'); | |
17 | |
18 debug("<br>Test properties[name]."); | |
19 shouldBeDefined("element.properties['foo']"); | |
20 shouldBe("element.properties['foo'].length", '1'); | |
21 shouldBe("element.properties['foo'][0]", 'element.firstChild'); | |
22 | |
23 debug("<br>Test properties[index]."); | |
24 shouldBeDefined("element.properties[0]"); | |
25 shouldBe("element.properties[0]", 'element.firstChild'); | |
26 | |
27 </script> | |
28 <script src="../../js/resources/js-test-post.js"></script> | |
29 </body> | |
30 </html> | |
OLD | NEW |