Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/styling/invalidation/pct-stroke-dasharray-02.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html class="reftest-wait">
<title>Invalidation of stroke-dasharray with percentage units</title>
<link rel="match" href="pct-stroke-dasharray-02-ref.html">
<script src="/common/reftest-wait.js"></script>
<script src="/common/rendering-utils.js"></script>
<style>
svg {
width: 100%;
display: block;
}
</style>
<div id="toggler" style="width: 500px; overflow: hidden">
<svg height="120">
<text x="10" y="90" font-size="90" fill="none" stroke="green"
stroke-width="5"
stroke-dasharray="4%">Hello</text>
</svg>
</div>
<script>
function doTest() {
const toggler = document.querySelector("#toggler");
toggler.getBoundingClientRect();
toggler.style.width = "200px";
takeScreenshot();
}
document.documentElement.addEventListener("TestRendered", doTest);
</script>
</html>