Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/animations/use-instance-animate-begin-element.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html class="reftest-wait">
<title>beginElement() on an animation element also begins its use-element instance</title>
<link rel="match" href="../struct/reftests/reference/green-100x100.html">
<script src="/common/reftest-wait.js"></script>
<svg width="100" height="100">
<symbol id="animated-symbol">
<rect width="100" height="100" fill="red">
<set id="anim" attributeName="fill" to="green" begin="indefinite"/>
</rect>
</symbol>
<use href="#animated-symbol"/>
</svg>
<script>
window.onload = () => {
const svg = document.querySelector('svg');
svg.pauseAnimations();
document.getElementById('anim').beginElement();
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));
};
</script>