cross-container-1.xhtml (1139B)
1 <?xml version="1.0" encoding="UTF-8" ?> 2 <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait"> 3 <!-- 4 The simplest possible test of a cross-time container dependency. 5 --> 6 <head> 7 <script> 8 function snapshot() { 9 var a = document.getElementById("svg-a"); 10 var b = document.getElementById("svg-b"); 11 b.pauseAnimations(); 12 a.pauseAnimations(); 13 b.setCurrentTime(1); // In document time, 'b' has now begun and therefore so 14 // has 'a' 15 a.setCurrentTime(1); // So we only need seek forward 1s to get to the middle 16 // of the animation 17 document.documentElement.removeAttribute("class"); 18 } 19 </script> 20 </head> 21 <body onload="snapshot()"> 22 <svg xmlns="http://www.w3.org/2000/svg" width="120px" height="120px" id="svg-a"> 23 <rect width="100" height="100" fill="red"> 24 <animate attributeName="fill" attributeType="CSS" id="a" 25 values="orange; green; purple" calcMode="discrete" 26 begin="b.begin" dur="2s"/> 27 </rect> 28 </svg> 29 <svg xmlns="http://www.w3.org/2000/svg" width="120px" height="120px" id="svg-b"> 30 <set attributeName="y" to="0" begin="1s" id="b"/> 31 </svg> 32 </body> 33 </html>