effect-in-removed-iframe-crash.html (779B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <meta name="viewport" content="width=device-width, initial-scale=1"> 6 <title>Querying keyframes for an effect in a removed iframe should not crash 7 </title> 8 <link rel="help" href="https://www.w3.org/TR/web-animations-1/#dom-keyframeeffect-getkeyframes"> 9 </head> 10 <body> 11 <div id="target"></div> 12 <iframe id="iframe"></iframe> 13 </body> 14 <script type="text/javascript"> 15 const target = document.getElementById('target'); 16 const iframe = document.getElementById('iframe'); 17 const keyframes = [{ background: 'green' }, { background: 'blue' }, ]; 18 const effect = new iframe.contentWindow.KeyframeEffect(target, keyframes); 19 iframe.parentNode.removeChild(iframe); 20 const result = effect.getKeyframes(); 21 </script> 22 </html>