013-manual.html (905B)
1 <!doctype html> 2 <html> 3 <head> 4 <title>A URL should prevent dropping on UI</title> 5 <style type="text/css"> 6 div { height: 100px; width: 100px; background: orange; } 7 </style> 8 <script type="text/javascript"> 9 window.onload = function () { 10 document.getElementsByTagName("div")[0].ondragstart = function (e) { 11 e.dataTransfer.effectAllowed = "copy"; 12 e.dataTransfer.setData("text","FAIL"); 13 e.dataTransfer.allowTargetOrigin("http://foo"); 14 }; 15 }; 16 </script> 17 </head> 18 <body> 19 <p>This test is only relevant on platforms where it is possible to drop data onto the browser UI (eg. the address field).</p> 20 <p>Drag the orange block to the address field and release it. Fail if the word "FAIL" appears in the address field. Repeat for other UI fields.</p> 21 <noscript><p>Enable JavaScript and reload</p></noscript> 22 <div draggable="true"></div> 23 </body> 24 </html>