How to get the target element for an 'selectionchange' dom event
<p>I find myself in a situation where I want to get the target element that triggered the selectionChange dom event.</p>

<p>But judging by <a href="https://developer.mozilla.org/en-US/docs/Web/Events/selectionchange" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Web/Events/selectionchange</a>, it seems that the element in e.target is always the document object in the normal (non-input, non-textarea) case.</p>

<p>So does that mean I will have to manually call window.getSelection, and figure out the current cursor location and find the dom node that way?</p>

<p>Does anyone know of a short cut? or some working example would be nice.</p>