Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset=utf-8>
<title>Window.isSecureContext after its iframe is removed</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<body>
<script>
test(() => {
assert_false(self.isSecureContext, "An http: page is not a secure context");
const iframe = document.body.appendChild(document.createElement("iframe"));
const iframeWindow = iframe.contentWindow;
assert_false(iframeWindow.isSecureContext, "Before removal");
iframe.remove();
assert_false(iframeWindow.isSecureContext, "After removal");
}, "Removing an iframe does not make its window a secure context");
</script>