fullscreen-pseudo-class-support.html (981B)
1 <!DOCTYPE html> 2 <title>:fullscreen pseudo-class support</title> 3 <link rel="help" href="https://fullscreen.spec.whatwg.org/#:fullscreen-pseudo-class"> 4 <link rel="help" href="https://dom.spec.whatwg.org/#dom-element-matches"> 5 <link rel="help" href="https://dom.spec.whatwg.org/#dom-parentnode-queryselector"> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <body> 9 <script> 10 // This is a separate test so that support for :fullscreen can be detected 11 // without actually going fullscreen. If it were not supported, then this test 12 // would fail. 13 test(t => { 14 // precondition is to throw for unknown pseudo-classes: 15 assert_throws_dom("SyntaxError", () => document.body.matches(':halfscreen')); 16 assert_throws_dom("SyntaxError", () => document.querySelector(':halfscreen')); 17 // the actual test: 18 assert_false(document.body.matches(':fullscreen')); 19 assert_equals(document.querySelector(':fullscreen'), null); 20 }); 21 </script>