mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-14 15:13:07 +00:00
That is what the spec calls it, at least. In code, this manifests as making the offset very aware of the element's transform, because the click position comes relative to the viewport, not to the transformed element.
21 lines
385 B
HTML
21 lines
385 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
div {
|
|
width: 100px;
|
|
height: 100px;
|
|
background-color: gray;
|
|
transform: rotate(45deg);
|
|
}
|
|
</style>
|
|
<div onClick="
|
|
println(`offsetX: ${event.offsetX}`);
|
|
println(`offsetY: ${event.offsetY}`);
|
|
"></div>
|
|
|
|
<script src="../include.js"></script>
|
|
|
|
<script>
|
|
test(() => {
|
|
internals.click(50, 60);
|
|
});
|
|
</script>
|