Source code

Revision control

Copy as Markdown

Other Tools

<?xml version="1.0" encoding="utf-8"?>
<head>
<title>Removing iframe during drag and drop of link</title>
<style type="text/css">
iframe
{height:100px;
width:300px;
border:solid medium navy;}
</style>
</head>
<body ondragenter="event.preventDefault();document.querySelector('body').removeChild(document.querySelector('iframe'))" ondragover="return false" ondrop="document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,1')?'PASS':'FAIL'">
<iframe src="helper-drag-me-link.xhtml">XHTML document</iframe>
<p>Drag link above out of frame and drop it somewhere on the page. You should see word PASS once you drop it.</p>
</body>
</html>