4 <script src="../../js/resources/js-test-pre.js"></script>
5 <script src="resources/microdata-common.js"></script>
8 <p>This tests that live NodeList must notice when itemtype changes.</p>
9 <div itemscope itemtype="http://example.com/foo" id="one"></div>
10 <div itemscope itemtype="http://example.com/foo" id="two"></div>
11 <div id="console"></div>
13 var one = document.getElementById('one');
14 var two = document.getElementById('two');
16 runTest(document.getItems('http://example.com/foo'), [one, two], "This test page contain two microdata items");
18 // Remove itemtype attribute
19 one.removeAttribute('itemtype');
20 runTest(document.getItems('http://example.com/foo'), [two], "NodeList must notice on remove attribute itemtype");
22 // Set itemtype attribute
23 one.setAttribute('itemtype','http://example.com/foo');
24 runTest(document.getItems('http://example.com/foo'), [one, two], "NodeList must notice on set attribute itemtype");
27 <script src="../../js/resources/js-test-post.js"></script>