mirror of
https://github.com/servo/servo.git
synced 2025-06-25 01:24:37 +01:00
30 lines
813 B
HTML
30 lines
813 B
HTML
<!DOCTYPE html>
|
|
<html class=reftest-wait>
|
|
<title>View transitions: entry animation from root display none</title>
|
|
<link rel="help" href="https://github.com/WICG/view-transitions">
|
|
<link rel="author" href="mailto:vmpstr@chromium.org">
|
|
|
|
<script src="/common/reftest-wait.js"></script>
|
|
<style>
|
|
.hidden {
|
|
display: none;
|
|
}
|
|
::view-transition-group(*) {
|
|
animation-duration: 500s
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
|
|
|
|
async function runTest() {
|
|
transition = document.startViewTransition();
|
|
transition.ready.then(
|
|
requestAnimationFrame(() => {
|
|
document.documentElement.classList.toggle("hidden");
|
|
}));
|
|
transition.finished.then(takeScreenshot);
|
|
}
|
|
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
|
|
</script>
|
|
|