ladybird/Tests/LibWeb/Layout/input/popovertarget-button.html
2025-01-30 15:46:52 -07:00

12 lines
379 B
HTML

<button popovertarget="pop" id="button"></button>
<div popover id="pop">
<span>I'm a node</span>
</div>
<script>
document.addEventListener("DOMContentLoaded", () => {
let button = document.getElementById('button');
const rect = button.getBoundingClientRect();
internals.click(rect.x + rect.width / 2, rect.y + rect.height / 2);
});
</script>