title: Get value change event on drop to input element
body: <p>In cross-browser Javascript, how to get an event after the value of an <code>&lt;input&gt;</code> element is changed because of a text being dragged and dropped into the field?</p>
  
  <pre><code>input.addEventListener("change", cb); // Is not triggered on drop
  input.addEventListener("drop", cb);   // Is triggered before the value change
  </code></pre>
  
  <p>A snippet to demonstrate the problem:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>let input = document.getElementById('input');
  let button = document.getElementById('button');
  let div = document.getElementById('div');
  
  function log(msg) {
   let el = document.createElement('pre');
   el.textContent = msg;
   div.appendChild(el);
  }
  
  input.addEventListener("change", function() {
   log("CHANGE: " + input.value);
  });
  
  input.addEventListener("keyup", function() {
   log("KEYUP: " + input.value);
  });
  
  input.addEventListener("drop", function() {
   log("DROP: " + input.value);
  });
  
  button.addEventListener("click", function()  {
   log("CLICK: " + input.value);
  });
  
  log("Try dragging text into the input field");</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input id="input"&gt;&lt;/input&gt;
  &lt;button id="button"&gt;Click&lt;/button&gt;
  &lt;div id="div"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>