Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/styling/use-element-id-selector-transition.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="reftest-wait">
<title>SVG Test: Id change in template starts transition in <use> element tree</title>
<link rel="match" href="use-element-selector-ref.html">
<style>
#rect { fill: black; transition: fill 1000s steps(2, start); }
#id > #rect { fill: lime; }
</style>
<svg>
<use id="use_elm" xlink:href="#tmpl" />
<defs>
<g id="tmpl">
<g id="no_id">
<rect id="rect" width="100" height="100"></rect>
</g>
</g>
</defs>
</svg>
<script>
requestAnimationFrame(() => {
requestAnimationFrame(() => {
no_id.setAttribute("id", "id");
document.documentElement.classList.remove('reftest-wait');
});
});
</script>