Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!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>