Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<html class="reftest-wait">
<title>Table's cellspacing attribute changing dynamically</title>
<link rel="author" title="Oriol Brufau" href="obrufau@igalia.com">
<link rel="match" href="/css/reference/ref-filled-green-200px-square.html">
<meta name="assert" content="
Changing the value of the `cellspacing` attribute on the `<table>`
should update the cell spacing properly.
">
<style>
#wrapper { width: 200px; height: 200px; background: red; }
#target { background: green }
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div id="wrapper">
<table id="target" cellpadding="0" cellspacing="10">
<td></td>
</table>
</div>
<script src="/common/rendering-utils.js"></script>
<script src="/common/reftest-wait.js"></script>
<script type="module">
await waitForAtLeastOneFrame();
document.getElementById("target").setAttribute("cellspacing", "100");
takeScreenshot()
</script>
</html>