-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Conversation
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
cc @rwlbuis |
There was a problem hiding this 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 😅
I think we should revert web-platform-tests/wpt#46072 too |
All the checkboxes are ticked. Merge? |
Do you have a tests PR for reverting web-platform-tests/wpt#46072 ? |
|
This reverts commit 6c91fbc (#46072) as part of whatwg/html#10898.
…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
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.
The
sourceElement
of thenavigate
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
sourceElement
mozilla/standards-positions#1154sourceElement
WebKit/standards-positions#441(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 )