27 lines
918 B
HTML
27 lines
918 B
HTML
<body>
|
|
<svg id="svg" width="500" height="500">
|
|
<rect x="150" y="0" width="100" height="100" fill="red"/>
|
|
<rect width="100" height="100" fill="green">
|
|
<animate id="animate1" attributeName="x" dur="10s" calcMode="paced" values="100; 150; 200;" keyTimes="0; 0.2; 1"/>
|
|
</rect>
|
|
</svg>
|
|
<script>
|
|
window.addEventListener('load', (event) => {
|
|
if (window.testRunner)
|
|
testRunner.waitUntilDone();
|
|
|
|
window.requestAnimationFrame(() => {
|
|
let svg = document.getElementById('svg');
|
|
let animate1 = document.getElementById('animate1');
|
|
|
|
animate1.setAttribute('calcMode', 'linear');
|
|
svg.pauseAnimations();
|
|
svg.setCurrentTime(2);
|
|
|
|
if (window.testRunner)
|
|
testRunner.notifyDone();
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|