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

Merged
merged 4 commits into from
Jan 28, 2025
Merged

Add NavigateEvent.sourceElement #10898

merged 4 commits into from
Jan 28, 2025

Conversation

noamr
Copy link
Collaborator

@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

@noamr
Copy link
Collaborator Author

noamr commented Jan 27, 2025

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

All the checkboxes are ticked. Merge?

@domenic
Copy link
Member

domenic commented Jan 28, 2025

Do you have a tests PR for reverting web-platform-tests/wpt#46072 ?

@noamr
Copy link
Collaborator Author

noamr commented Jan 28, 2025

Do you have a tests PR for reverting web-platform-tests/wpt#46072 ?

web-platform-tests/wpt#50329

domenic pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 28, 2025
@domenic domenic merged commit d5c8e5c into whatwg:main Jan 28, 2025
2 checks passed
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 29, 2025
…eElement", a=testonly

Automatic update from web-platform-tests
Revert "Check use of NavigateEvent.sourceElement (#46072)" (#50329)

This reverts commit 6c91fbce8312c431a1e0a6db5d001438f96531e9 (#46072) as part of whatwg/html#10898.
--

wpt-commits: 765e5eec7bda0828ba73b3b0d28a7d661eeceb17
wpt-pr: 50329
AtkinsSJ added a commit to AtkinsSJ/ladybird that referenced this pull request Jan 30, 2025
Corresponds to whatwg/html#10898

This is with whatwg/html#10971 also applied -
the original PR missed `sourceElement` from the `NavigateEventInit`
dictionary.

I've also updated the imported WPT test as it's been recently changed to
account for 10898 being merged.
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