Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
            
- /css/css-animations/keyframes-remove-documentElement-crash.html - WPT Dashboard Interop Dashboard
 
 
<!doctype html>
<html class="test-wait">
<title>CSS Animations Test: Chrome crash when removing documentElement and @keyframes stylesheet</title>
<style>
  @keyframes anim {
    from { color: pink }
    to { color: purple }
  }
  div {
    animation: notfound 1s;
  }
</style>
<div></div>
<script>
window.addEventListener('load', () => {
  document.body.offsetTop;
  document.querySelector("style").remove();
  // We need the root later to remove the test-wait class.
  const root = document.documentElement;
  document.documentElement.remove();
  // rAF to make sure that style runs.
  requestAnimationFrame(() => {
    root.classList.remove('test-wait');
  });
});
</script>