tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

028.xhtml (884B)


      1 <?xml version="1.0" encoding="utf-8"?>
      2 <html xmlns="http://www.w3.org/1999/xhtml">
      3 <head>
      4 <title>Link drag and drop: 'return false' should not cancel event</title>
      5 <style type="text/css">
      6 div
      7  {min-height:100px;
      8  width:100px;
      9  padding:20px;
     10  color:white;
     11  background-color:navy;}
     12 </style>
     13 </head>
     14 <body onload="document.querySelector('a').addEventListener('drag',function (){return false},false)">
     15 <p><a href="data:text/plain,1" ondragstart="event.dataTransfer.effectAllowed = 'copy'">Drag me</a></p>
     16 <p>Drag link above to the navy box below and drop it. You should see word PASS once you drop it in the box.</p>
     17 <div ondragenter="event.preventDefault()" ondragover="return false" ondrop="document.querySelector('div').appendChild(document.createTextNode((event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,1')?'PASS':'FAIL'))"/>
     18 </body>
     19 </html>