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:
- /speculation-rules/prerender/script-supports-speculationrules.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<title>HTMLScriptElement.supports speculationrules</title>
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(function() {
assert_true(HTMLScriptElement.supports('speculationrules'));
}, 'HTMLScriptElement.supports returns true for \'speculationrules\'');
test(function() {
assert_false(HTMLScriptElement.supports(' speculationrules'));
assert_false(HTMLScriptElement.supports('speculationrules '));
assert_false(HTMLScriptElement.supports('Speculationrules'));
assert_false(HTMLScriptElement.supports('SpeculationRules'));
assert_false(HTMLScriptElement.supports('speculationRules'));
assert_false(HTMLScriptElement.supports('speculation-rules'));
}, 'HTMLScriptElement.supports returns false for unsupported types');
</script>