Back to Content

Navigation: activation property

files/en-us/web/api/navigation/activation/index.md

latest860 B
Original Source

{{APIRef("Navigation API")}}

The activation read-only property of the {{domxref("Navigation")}} interface returns a {{domxref("NavigationActivation")}} object containing information about the most recent cross-document navigation, which "activated" this Document. The property will stay constant during same-document navigations.

Value

A {{domxref("NavigationActivation")}} object, or null if current document is the initial about:blank document.

Examples

js
if (navigation.activation) {
  console.log(navigation.activation.entry.url);
}

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also