tor-browser

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

004.xhtml (789B)


      1 <?xml version="1.0" encoding="utf-8"?>
      2 <html xmlns="http://www.w3.org/1999/xhtml">
      3 <head>
      4 <title>Removing input element during drag and drop of selection</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('input').select()">
     15 <p><input value="Drag me" ondragstart="document.querySelector('p').removeChild(document.querySelector('input'))"/></p>
     16 <p>Drag selection above to the navy box below and drop it. You should see word PASS once you drop it in the box.</p>
     17 <div ondragover="return false" ondrop="document.querySelector('div').appendChild(document.createTextNode((event.dataTransfer.getData('text/plain') == 'Drag me')?'PASS':'FAIL'))"/>
     18 </body>
     19 </html>