blob: de047cb463cff5c1d8af268f1e08908c9684fe8c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/mediaqueries-5/#scripting">
<script type="text/javascript" src="/resources/testharness.js"></script>
<script type="text/javascript" src="/resources/testharnessreport.js"></script>
<script type="text/javascript" src="resources/matchmedia-utils.js"></script>
<script>
query_should_be_known("(scripting)");
query_should_be_known("(scripting: enabled)");
query_should_be_known("(scripting: initial-only)");
query_should_be_known("(scripting: none)");
query_should_be_unknown("(scripting: 0)");
query_should_be_unknown("(scripting: 10px)");
query_should_be_unknown("(scripting: invalid)");
test(() => {
let match_enabled = window.matchMedia("(scripting: enabled)");
assert_true(match_enabled.matches);
}, "Check that scripting currently matches 'enabled'");
test(() => {
let booleanContext = window.matchMedia("(scripting)");
assert_true(booleanContext.matches);
}, "Check that scripting currently evaluates to true in the boolean context");
</script>
|