Firefox Tomorrow

web api instance property

NavigateEvent: sourceElement property

View on MDN ↗

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:

Value

An Element object representing the element that initiated the navigation, or null if the navigation was not initiated by an element.

Examples

Getting the sourceElement for an event

navigation.addEventListener("navigate", (event) => {
  console.log(event.sourceElement);
});

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also