1 <!DOCTYPE html> 2 <html> 3 <head> 4 <script> 5 function debug(str) { 6 var c = document.getElementById('console') 7 c.appendChild(document.createTextNode(str + '\n')); 8 } 9 10 var i = new Image() 11 i.src ="resources/webkit-background.png"; 12 13 function dragStartHandler() { 14 event.dataTransfer.setDragImage(i, 10, 10); 15 } 16 17 </script> 18 </head> 19 <body onload="runTests();"> 20 <p>This tests that setting the drag image works. If this is successful, the drag icon when dragging the text below around should look like the image below.</p> 21 <img src="resources/webkit-background.png"> 22 <div ondragstart="dragStartHandler()" draggable="true">Try dragging me around!</div> 23 <pre id="console"> 24 </pre> 25 </body> 26 </html> 27