028.html (998B)
1 <!doctype html> 2 <html> 3 <head> 4 <title>Dropping element with uninitialized effectAllowed</title> 5 <style type="text/css"> 6 div, p { 7 margin: 0.2em; 8 height: 70px; 9 width: 400px; 10 background: orange; 11 color: black; 12 } 13 p { 14 background: navy; 15 color: white; 16 } 17 </style> 18 <script type="text/javascript"> 19 window.onload = function () { 20 var dragmicro = document.getElementsByTagName('div')[0]; 21 dragmicro.ondragstart = function (e) { 22 e.dataTransfer.setData('text/plain','dummy text'); 23 }; 24 var droptarget = document.getElementsByTagName('p')[0]; 25 droptarget.ondragenter = droptarget.ondragover = function (e) { 26 e.preventDefault(); 27 }; 28 droptarget.ondrop = function (e) { 29 e.preventDefault(); 30 this.innerHTML = 'PASS'; 31 }; 32 }; 33 </script> 34 </head> 35 <body> 36 37 <noscript><p>Enable JavaScript and reload</p></noscript> 38 <div draggable="true">Drag this rectangle.</div> 39 <p>Drop onto this rectangle. Fail if this text does not change.</p> 40 41 </body> 42 </html>