Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html class=reftest-wait>
<title>View Transitions: Scrolled target capture position</title>
<link rel="match" href="scrolled-target-position-ref.html">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="/common/reftest-wait.js"></script>
<script src="/web-animations/testcommon.js"></script>
<style>
#target {
width: 100px;
height: 100px;
overflow: scroll;
background: lightblue;
}
#child {
width: 50px;
height: 75px;
background: green;
}
#content {
width: 100px;
height: 400px;
background: yellow;
}
html::view-transition-group(*) { animation-play-state: paused; }
html::view-transition-old(*) { animation: none; opacity: 1; }
html::view-transition-new(*) { animation: none; opacity: 0; }
</style>
<div id="target">
<div id="content"><div id=child></div></div>
</div>
<script>
function runTest() {
target.scrollTop = 25;
target.startViewTransition().ready.then(takeScreenshot);
}
waitForCompositorReady().then(runTest);
</script>
</html>