Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/mediaqueries/scripting.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<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>