tor-browser

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

historical-manual.html (1000B)


      1 <!DOCTYPE html>
      2 <title>Historical drag-and-drop features</title>
      3 <meta charset="utf-8">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 
      7 <style>
      8 .test-square {
      9  width: 100px;
     10  height: 100px;
     11 }
     12 
     13 #draggable {
     14  background: orange;
     15 }
     16 
     17 #dropzone {
     18  background: blue;
     19 }
     20 </style>
     21 
     22 <p>Drag the orange square onto the blue square and release it.</p>
     23 
     24 <div draggable="true" id="draggable" class="test-square" ondragstart="event.dataTransfer.setData('text/plain', null)"></div>
     25 <div id="dropzone" class="test-square"></div>
     26 
     27 <script>
     28 "use strict";
     29 
     30 async_test(t => {
     31  let dragexitCount = 0;
     32  document.addEventListener("dragexit", () => {
     33    ++dragexitCount;
     34  });
     35 
     36  // Prevent the event to allow drop
     37  document.addEventListener("dragover", e => {
     38    e.preventDefault();
     39  });
     40 
     41  document.addEventListener("drop", t.step_func_done(() => {
     42    assert_equals(dragexitCount, 0);
     43  }));
     44 }, `dragexit must not fire during drag-and-drop`);
     45 </script>