Truly independent web browser
<!DOCTYPE html>
<script src="../include.js"></script>
<style>
body {
margin: 0;
}
.box {
width: 600px;
}
img {
width: 600px;
height: 300px;
vertical-align: middle;
}
.float {
float: left;
width: 100%;
height: 80px;
}
</style>
<div class="box">
<img id="a" src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='300'/%3E">
<div class="float" style="margin-top: -180px"></div>
</div>
<div class="box">
<img id="b" src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='300'/%3E">
<div class="float" style="margin-top: -20px"></div>
</div>
<div class="box">
<img id="c" src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='300'/%3E">
<div class="float" style="margin-top: 0"></div>
</div>
<script>
asyncTest(done => {
window.onload = () => {
for (const id of "abc")
println(`${id}: ${document.getElementById(id).getBoundingClientRect().left}`);
done();
};
});
</script>