PerformanceSoftNavigation: interactionId property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The interactionId read-only property of the PerformanceSoftNavigation interface returns the interactionId of the PerformanceEventTiming entry representing the interaction that resulted in the soft navigation.

Value

An integer matching the interactionId of the interaction that resulted in the soft navigation.

Examples

Logging the interactionId of the soft navigation

This example uses a PerformanceObserver to log new soft-navigation performance entries as they are recorded in the browser's performance timeline. The buffered option is used to access entries from before the observer creation.

js
const observer = new PerformanceObserver((list) => {
  for (const entry of list.getEntries()) {
    console.log("Soft Nav:", entry.startTime, entry.interactionId);
  }
});
observer.observe({ type: "soft-navigation", buffered: true });

Specifications

Specification
Soft Navigations and Interaction Contentful Paint
# dom-performancesoftnavigation-interactionid

Browser compatibility