OLD | NEW |
(Empty) | |
| 1 <script src="../../../resources/js-test.js"></script> |
| 2 <script> |
| 3 description('Tests :first-child rule under DocumentFragment.'); |
| 4 |
| 5 var fragment = document.createDocumentFragment(); |
| 6 var div = document.createElement('div'); |
| 7 var a1 = document.createElement('a'); |
| 8 var a2 = document.createElement('a'); |
| 9 |
| 10 fragment.appendChild(a1); |
| 11 div.appendChild(a2); |
| 12 |
| 13 var fragmentSelected = fragment.querySelector('a:first-child'); |
| 14 var elementSelected = div.querySelector('a:first-child'); |
| 15 |
| 16 shouldBe("fragmentSelected", "a1"); |
| 17 shouldBe("elementSelected", "a2"); |
| 18 </script> |
OLD | NEW |