'How to know drag-drop is outside of browser-window?

I try to check if a draggable element is dropped outside the browser-window. Is that possible? I do not know how to thet that info out of the event of ondragend.

<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
function foo (txt, e)
{
    console.log (txt, e);
}
</script>

<div style="border:2px red solid; width: 200px;" draggable="true"  
  ondragstart="foo('start', event)"
  ondragend="foo('end', event)">
  abc<br>xzy
</div>
</body>
</html>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source