Source code
Revision control
Copy as Markdown
Other Tools
<html>
<head>
<title>CSP frame-ancestors Violation Test
</title>
</head>
<body>
<iframe src="https://example.com/browser/devtools/client/webconsole/test/browser/test-csp-violation-frame-ancestor-child.html"></iframe>
</body>
<script>
"use strict";
window.violate = () => {
const iframe = document.querySelector("iframe");
const src = iframe.src;
iframe.src = "";
requestAnimationFrame(() => {
iframe.src = src;
});
};
</script>
</html>