cells.html (722B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>HTMLTableRowElement#cells</title> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 7 <div id="log"></div> 8 9 <table> 10 <tr id="testTr"> 11 <td>First</td> 12 <div><td>Second</td></div> 13 <td>Third 14 <table> 15 <tr><td>Nested first</td></tr> 16 </table> 17 </td> 18 <img> 19 </tr> 20 </table> 21 <script> 22 var tr = document.getElementById("testTr"); 23 24 test(function () { 25 tr.insertBefore(document.createElementNS("foo", "td"), tr.children[1]); 26 assert_array_equals(tr.cells, [tr.children[0], tr.children[2], tr.children[3]]); 27 }, "HTMLTableRowElement cells ignores nested tables and non-HTML elements"); 28 </script>