event.currentTarget identifies the object whose listener is handling an event. Unlike event.target, it does not identify where the event originally began. A click on a button can bubble to a document listener, making the document the currentTarget. section 14.3
Document listener and a Web Component
A document-level click listener logs e.target, e.currentTarget, and e.composedPath(). Clicking the component’s button makes the button the target, while document remains the currentTarget. The propagation path includes the button, component, document, and Window. section 14.3
Shadow DOM can hide the internal button from outside listeners: event.target may appear as the Web Component, but event.currentTarget remains the document where the listener was added.
