Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /sanitizer-api/sanitizer-secure-context.https.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
// Currently, the Sanitizer requires a secure context.
test(t => {
assert_true(globalThis.isSecureContext);
assert_equals("Sanitizer" in globalThis, globalThis.isSecureContext);
assert_equals("setHTML" in document.body, globalThis.isSecureContext);
}, "SanitizerAPI in a secure context.");
</script>
</body>
</html>