Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<title>Computed value of position:sticky for table elements</title>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<style>
table * {
position: sticky;
}
</style>
<table>
<thead>
</thead>
<tbody>
<tr>
<td>Test</td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
<script>
for (let element of document.querySelectorAll('table *')) {
test(() => {
assert_equals(getComputedStyle(element).position, 'sticky');
}, `Computed value of position:sticky on ${element.tagName}`);
}
</script>