1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 15:24:57 +00:00
serenity/Tests/LibWeb/Text/input/DOM/element-scroll-height.html
Aliaksandr Kalenik 591c8d2b68 LibWeb: Return overflow rect height from Element::scroll_height()
Spec says that this function has to return "height of the element
scrolling area" which is height of "scrolling overflow rect" in our
model.
2024-02-19 20:07:12 +01:00

25 lines
693 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<style>
* {
outline: 1px solid black;
}
.scrollable {
height: 300px;
overflow-y: auto;
}
span {
width: 100px;
height: 100px;
display: block
}
</style>
<div class="scrollable"><span>Item 1</span><span>Item 2</span><span>Item 3</span><span>Item 4</span><span>Item 5</span><span>Item 6</span><span>Item 7</span><span>Item 8</span><span>Item 9</span><span>Item 10</span><span>Item 11</span><span>Item 12</span></div>
<script>
test(() => {
const scrollable = document.querySelector(".scrollable");
println(scrollable.scrollHeight);
});
</script>