blob: c264483f169ac8e344b79665a5bdd6b176f71bf8 [file] [log] [blame]
<style>
div { border: 2px solid blue; display:inline-block; margin-left:100px; width:200px; }
button { margin-left:-75px; width:50px; height:50px; }
</style>
<div><button>X</button></div>
<pre id=log></pre>
<script>
if (window.testRunner)
testRunner.dumpAsText();
const hitTestElement = document.elementFromPoint(50, 50);
log.innerText = hitTestElement == document.querySelector('button') ? "PASS" : "FAIL";
</script>