blob: c853fa9cb135924ce82087f221b766edae6ebf0b [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Setting drag image during drag and drop of selection</title>
<style type="text/css">
span
{color:green;
background-color:yellow;}
</style>
<script type="application/ecmascript">
function start(event)
{event.dataTransfer.effectAllowed = 'copy';
event.dataTransfer.setDragImage(document.querySelector('span'), 1, 1);}
</script>
</head>
<body onload="window.getSelection().selectAllChildren(document.querySelector('p'))">
<p ondragstart="start(event)">Drag me</p>
<p>Try to drag selection above. You should see word <span>PASS</span> in feedback overlay.</p>
</body>
</html>