syncbase-after-removal.html (774B)
1 <!DOCTYPE html> 2 <title>Sync base 'begin' after removal from the document</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <svg> 6 <rect height="100" width="100"> 7 <animate id="anim" begin="0s;anim.end" dur="50ms" 8 attributeName="width" from="50" to="100"/> 9 </rect> 10 </svg> 11 <script> 12 promise_test(t => { 13 const animation = document.getElementById('anim'); 14 const watcher = new EventWatcher(t, animation, 'beginEvent'); 15 // Wait for three 'beginEvent' events. 16 const p = watcher.wait_for(['beginEvent', 'beginEvent', 'beginEvent']); 17 const svg = document.querySelector('svg'); 18 document.body.removeChild(svg); 19 document.body.appendChild(svg); 20 return p; 21 }); 22 </script>