focusNode

The Selection.focusNode read-only property returns the Node in which the selection ends.

MDN Reference