blob: 003cb9b68a15dae2c4888e2d988834fdd92793e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<link rel="author" title="Chris Harrelson" href="mailto:chrishtr@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring/">
<script src="/common/reftest-wait.js"></script>
</head>
<style>
#outer {
overflow: hidden;
width: 500px;
height: 500px;
}
#inner {
overflow: auto;
position: relative;
width: 500px;
height: 2000px;
}
p {
font: 48pt monospace;
}
</style>
</head>
<body>
<div id="outer">
<div id="inner">
<p>Anchor</p>
</div>
</div>
<script>
const outer = document.querySelector("#outer");
const inner = document.querySelector("#inner");
onload = () => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
outer.scrollTo(0, 70);
takeScreenshot();
});
});
};
</script>
|