Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
            
- /css/css-view-transitions/scoped/crashtests/replace-html.html - WPT Dashboard Interop Dashboard
 
 
<!DOCTYPE html>
<html class="test-wait">
<script>
onload = async () => {
  const doc = document,
        old_html = doc.documentElement,
        new_html = doc.createElement("html");
  new_html.className = "test-wait";
  const transition = doc.startViewTransition(() => {});
  doc.replaceChild(new_html, old_html);
  await transition.finished;
  new_html.classList.remove('test-wait');
  old_html.classList.remove('test-wait');
}
</script>
</html>