Truly independent web browser
<!DOCTYPE html>
<script src="../include.js"></script>
<style>
body {
margin: 0;
height: 3000px;
}
#nested {
position: absolute;
top: 250px;
left: 0;
width: 100px;
height: 300px;
overflow: scroll;
}
#nested > div {
height: 800px;
}
</style>
<div id="nested"><div></div></div>
<script>
promiseTest(async () => {
await internals.wheelThroughUIProcess(50, 80, 0, 0, true, "ongoing");
await internals.wheelThroughUIProcess(50, 80, 0, 0, true, "ended");
window.addEventListener("wheel", () => {}, { passive: false });
await animationFrame();
await animationFrame();
await internals.wheel(50, 80, 0, 200, true, "ongoing");
println(`window.scrollY after the first step: ${window.scrollY}`);
await internals.wheel(50, 80, 0, 100, true, "ongoing");
println(`window.scrollY after the second step: ${window.scrollY}`);
println(`nested.scrollTop after the second step: ${nested.scrollTop}`);
await internals.wheel(50, 80, 0, 0, true, "ended");
});
</script>