title: javascript drag and drop: detect if dropped outside of window
body: <p>I have two lists of items - each list in a separate browser window. I have Drag n Drop working between them - which lets me move the items between the windows. Sometimes I just move the items within the same window.</p>
  
  <p>When moving an item from window A to window B I want both windows to refresh to reflect the change. A uses the Drop event and B uses the DragEnd event. However when dragging within the same window I don't want to fire two refresh events on the same page.</p>
  
  <p>It would be nifty to detect that the drop happened outside of its own browser window. How do I do that?</p>
  
  <p>Ps. I've just seen <a href="https://stackoverflow.com/questions/10253663/how-to-detect-the-dragleave-event-in-firefox-when-dragging-outside-the-window">How to detect the dragleave event in Firefox when dragging outside the window</a> but I'd rather see a more simple approach.</p>