Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

SVG Preview (Scaled)

Preview of https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/reftests/svg/dynamic-use-08.svg
<!--
Any copyright is dedicated to the Public Domain.
-->
class="reftest-wait">
<title>Testing dynamic changes to use positioning</title>
<style>
.use {
x: 100%;
}
</style>
<defs>
<rect id="r" width="100%" height="100%" fill="red"/>
</defs>
<rect width="100%" height="100%" fill="lime"/>
<use id="u" xlink:href="#r"/>
<script type="text/javascript">
document.addEventListener("MozReftestInvalidate", doTest, false);
setTimeout(doTest, 4000); // fallback for running outside reftest
function doTest() {
document.getElementById("u").setAttribute("class", "use");
document.documentElement.removeAttribute("class");
}
</script>
</svg>