tor-browser

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

018.xhtml (1080B)


      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: events after dragenter is cancelled</title>
      5 <script type="application/ecmascript">
      6 function start(event)
      7  {event.preventDefault();}
      8 function dragMe(event)
      9  {say('FAIL (drag event should not fire if dragstart is cancelled)');}
     10 function enterBody(event)
     11  {event.preventDefault();
     12  say('FAIL (dragover event should not fire if dragstart is cancelled)');}
     13 function overBody(event)
     14  {event.preventDefault();
     15  say('FAIL (dragover event should not fire if dragstart is cancelled)');}
     16 function dropIt(event)
     17  {say('FAIL (drop event should not fire if dragstart is cancelled)');}
     18 function say(it)
     19  {document.querySelector('pre').appendChild(document.createTextNode(it + '\n'));}
     20 </script>
     21 </head>
     22 <body ondragenter="enterBody(event)" ondragover="overBody(event)" ondrop="dropIt(event)">
     23 <p><a href="data:text/plain,1" ondragstart="start(event)" ondrag="dragMe(event)">Try to drag me</a></p>
     24 <p>You should not be able to drag link above.</p>
     25 <pre/>
     26 </body>
     27 </html>