← Back to release summary

NavigateEvent sourceElement

Category
Miscellaneous
Type
New or changed feature
Status
Enabled by default (Chrome 135)
Intent stage
None

Summary

When a navigation is initiated by an Element (i.e., a link click or a form submission), the sourceElement property on the NavigateEvent will be the initiating element.

Motivation

This was requested by web developers. It provides an easy way to disambiguate which of several possible elements initiated a navigation.

Standards & signals

Explainers: https://github.com/WICG/navigation-api/commit/85edaf1d4d42355b020807cd56f6a22784978c3d

View on chromestatus.com