Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /scroll-animations/crashtests/scroll-timeline-completion-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>This test passes if it does not crash</title>
<script src="/web-animations/testcommon.js"></script>
<style>
@keyframes grow-progress {
from { background-color: green; }
to { background-color: red; }
}
#container {
overflow: scroll;
width: 100px;
height: 100px;
animation: grow-progress linear forwards;
animation-timeline: scroll(self);
}
#content {
width: 200px;
height: 200px;
}
</style>
<body onload="runTest()">
<div id="container">
<div id="content"></div>
</div>
<script>
async function runTest() {
const container = document.getElementById("container");
container.scrollTo(0, container.scrollHeight - container.clientHeight);
await waitForNextFrame();
const elem = document.getElementById("content");
elem.style.width = "0px";
elem.style.height = "0px";
await waitForNextFrame();
}
</script>