1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 14:34:59 +00:00
serenity/Tests/LibWeb/Text/input/DOM/Offset-of-empty-inline-element.html
Tim Ledbetter d1226f0b15 LibWeb: Don't crash when querying offsets of empty inline elements
Previously, querying `offsetTop` or `offsetLeft` of an inline element
with no text would cause a crash.
2024-01-28 23:32:40 +01:00

12 lines
294 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<script>
test(() => {
const element = document.getElementById("empty");
println("Top: " + element.offsetTop);
println("Left: " + element.offsetLeft);
});
</script>
<body>
<span id="empty"></span>
</body>