mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #7829 - frewsxcv:htmltablecellelement-cellindex, r=Ms2ger
Implement HTMLTableCellElement::CellIndex Extracted from #6936 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7829) <!-- Reviewable:end -->
This commit is contained in:
commit
55769b2fbf
5 changed files with 29 additions and 28 deletions
|
@ -38,4 +38,13 @@ test(function() {
|
|||
var td = tr.appendChild(document.createElement("td"));
|
||||
assert_equals(td.cellIndex, 1);
|
||||
}, "For cells whose parent is a tr, cellIndex should be the index.")
|
||||
test(function() {
|
||||
var tr = document.createElement("tr");
|
||||
var th = tr.appendChild(document.createElement("th"));
|
||||
assert_equals(th.cellIndex, 0);
|
||||
tr.appendChild(document.createElement("div"));
|
||||
tr.appendChild(document.createTextNode("Hello World"));
|
||||
var td = tr.appendChild(document.createElement("td"));
|
||||
assert_equals(td.cellIndex, 1)
|
||||
}, "For cells whose parent is a tr with non td/th sibling, cellIndex should skip those non td/th siblings.")
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue