Source code

Revision control

Copy as Markdown

Other Tools

<!doctype html>
<title>drag &amp; drop - manually closing a window while a drag is in operation</title>
<script type="text/javascript">
window.onload = function() {
document.getElementsByTagName('ul')[0].ondragstart = function(e) {
e.dataTransfer.effectAllowed = 'copy';
e.dataTransfer.setData('Text', 'dummy text');
};
};
</script>
<ul draggable='true'>
<li>Drag this text downwards, and do not release the drag.</li>
<li>Use a keyboard shortcut (eg. Alt+F4 on Windows) to close the window.</li>
<li>The browser may optionally cancel the drag. The browser may optionally close the window. Fail if the drag placeholder gets stuck. Fail if the browser crashes.</li>
</ul>
<noscript><p>Enable JavaScript and reload</p></noscript>