blob: 86ef17c1035fb779397287903c0393cff174c95f [file]
<!DOCTYPE html>
<html>
<body>
<div id="target" style="width: 100px; height: 100px; background: red;"></div>
<script>
const target = document.getElementById('target');
target.addEventListener('mousedown', () => {
// Remove the mid iframe from the top window.
// Since mid is cross-origin, removing it synchronously detaches this frame.
parent.parent.document.getElementById('mid').remove();
});
</script>
</body>
</html>