interactivity-inert-find.html (803B)
1 <!DOCTYPE html> 2 <title>CSS Basic User Interface Test: window.find() works with the interactivity property</title> 3 <link rel="help" href="https://drafts.csswg.org/css-ui-4/#inertness"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <style> 7 .inert { interactivity: inert; } 8 .non-inert { interactivity: auto; } 9 </style> 10 <div> 11 MATCH-1 12 <div class="inert"> 13 MATCH-2 14 <div class="non-inert"> 15 MATCH-3 16 </div> 17 </div> 18 </div> 19 <script> 20 test(() => { 21 assert_true(window.find("MATCH-1")); 22 }, "Find non-inert text"); 23 24 test(() => { 25 assert_false(window.find("MATCH-2")); 26 }, "Fail to find inert text"); 27 28 test(() => { 29 assert_true(window.find("MATCH-3")); 30 }, "Find non-inert text inside inert ancestor"); 31 32 </script>