Source code
Revision control
Copy as Markdown
Other Tools
<html>
<head>
<title>Test setting parent location to javascript:</title>
document.addEventListener("securitypolicyviolation", (e) => {
window.parent.postMessage({
blockedURI: e.blockedURI,
violatedDirective: e.violatedDirective,
originalPolicy: e.originalPolicy,
}, '*');
});
</script>
</head>
<body>
<iframe src="file_iframe_parent_location_js.html"></iframe>
</body>
</html>