Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /scroll-animations/scroll-timelines/null-scroll-source-crash.html - WPT Dashboard Interop Dashboard
<meta name="assert" content="Playing animation with null scroll source should not crash.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
html {
overflow: scroll;
}
body {
overflow: scroll;
}
</style>
<div id="box"></div>
<script>
test(() => {
const effect = new KeyframeEffect(box, []);
const timeline = new ScrollTimeline();
const animation = new Animation(effect, timeline);
assert_equals(document.scrollingElement, null,
"This test relies on scrolling element being nil");
animation.play();
}, "Playing animation with null scroll source should not crash");
</script>