| 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>This test ensures that itemref must reference the first element with a given
id.</p> | |
| 9 <div id="console"></div> | |
| 10 <script> | |
| 11 var element = createElement('div',{},'<div itemscope itemref="id1"></div><div it
emprop="foo" id="id1"><div itemprop="bar"></div></div><div itemprop="baz" id="id
1"></div>'); | |
| 12 document.body.appendChild(element); | |
| 13 var item = element.childNodes[0]; | |
| 14 | |
| 15 shouldBeTrue("item.properties.length == '2'"); | |
| 16 shouldBeTrue("item.properties.item(0) == element.childNodes[1]"); | |
| 17 shouldBeTrue("item.properties.item(1) == element.childNodes[1].firstChild"); | |
| 18 | |
| 19 </script> | |
| 20 <script src="../../js/resources/js-test-post.js"></script> | |
| 21 </body> | |
| 22 </html> | |
| OLD | NEW |