Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-ui/interactivity-inert-find.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Basic User Interface Test: window.find() works with the interactivity property</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
.inert { interactivity: inert; }
.non-inert { interactivity: auto; }
</style>
<div>
MATCH-1
<div class="inert">
MATCH-2
<div class="non-inert">
MATCH-3
</div>
</div>
</div>
<script>
test(() => {
assert_true(window.find("MATCH-1"));
}, "Find non-inert text");
test(() => {
assert_false(window.find("MATCH-2"));
}, "Fail to find inert text");
test(() => {
assert_true(window.find("MATCH-3"));
}, "Find non-inert text inside inert ancestor");
</script>