summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/sanitizer-api/sanitizer-secure-context.https.html
blob: 0e04e04d169a40e8a4a82ce81bb3e29cd7de83a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!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>