How to find out currently active/selected DOM element

Recently I was trying to check what is the tab order on one of the web pages. Usually you can see what is the currently focused element, but on the page that I was working on after one of the input elements focus was taken to some element that was not visible. So I decided to open Chrome Developer Tools and see what is the current element in the focus. When I opened ‘Elements’ tab I could not find anything there that synchronize web page selected element with element on ‘Elements’ tab. So instead I went to ‘Console’ tab and used document.activeElement

document.activeElement
Returns the currently focused element, that is, the element that will get keystroke events if the user types any. This attribute is read only.

And that did the trick