Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NavigateEvent.sourceElement #10898

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

noamr
Copy link
Contributor

@noamr noamr commented Jan 7, 2025

The sourceElement of the navigate event is either the clicked link, the submitter button, or the submitted form if there was no submitter button.

See https://github.com/WICG/navigation-api?tab=readme-ov-file#navigation-monitoring-and-interception

(See WHATWG Working Mode: Changes for more details.)


/browsing-the-web.html ( diff )
/form-control-infrastructure.html ( diff )
/links.html ( diff )
/nav-history-apis.html ( diff )

noamr added 2 commits January 7, 2025 09:56
The `sourceElement` of the `navigate` event is either the clicked link,
the submitter button, or the submitted form if there was no submitter
button.

See https://github.com/WICG/navigation-api?tab=readme-ov-file#navigation-monitoring-and-interception
source Show resolved Hide resolved
source Show resolved Hide resolved
@annevk
Copy link
Member

annevk commented Jan 7, 2025

cc @rwlbuis

@annevk annevk requested a review from domenic January 13, 2025 14:52
@domenic domenic added addition/proposal New features or enhancements topic: navigation labels Jan 15, 2025
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful! I'm thankful we didn't have to thread this through too many layers 😅

source Show resolved Hide resolved
@domenic
Copy link
Member

domenic commented Jan 15, 2025

Tests are written and can be reviewed and commented upon at:

I think we should revert web-platform-tests/wpt#46072 too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements topic: navigation
Development

Successfully merging this pull request may close these issues.

3 participants