mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 02:13:56 +09:00
20 lines
564 B
HTML
20 lines
564 B
HTML
<!DOCTYPE html>
|
|
<!--refer to https://wpt.live/css/cssom-view/DOMRectList.html -->
|
|
<body>
|
|
<div id="x">x</div>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
function print_class_string(object) {
|
|
println({}.toString.call(object));
|
|
}
|
|
test(() => {
|
|
const x = document.getElementById("x");
|
|
const range = document.createRange();
|
|
range.selectNodeContents(x);
|
|
const domRectList = range.getClientRects();
|
|
print_class_string(domRectList);
|
|
print_class_string(domRectList.item(0));
|
|
});
|
|
</script>
|
|
|
|
</body>
|