hittest-anonymous-box.html (665B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://crbug.com/1097654" /> 3 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <style> 7 #target { 8 font: 20px/1 Ahem; 9 display: flex; 10 flex-direction: column; 11 border: 2px solid black; 12 width: 100px; 13 height: 100px; 14 } 15 </style> 16 <div id=target>X</div> 17 <script> 18 test(function(t) { 19 const target = document.getElementById('target'); 20 assert_equals(target, document.elementFromPoint(30, 10)); 21 }, 'Hit-testing within an anonymous flex-item should return the flexbox as the hittest result.'); 22 </script>