The sourceElement read-only property of the NavigateEvent interface returns an Element object representing the initiating element, in cases where the navigation was initiated by an element.
The initiating element can be:
<a> element (or SVG <a> element).<area> element.<input type="submit"> or <button type="submit">).<form> element.An Element object representing the element that initiated the navigation, or null if the navigation was not initiated by an element.
sourceElement for an eventnavigation.addEventListener("navigate", (event) => {
console.log(event.sourceElement);
});