-
Notifications
You must be signed in to change notification settings - Fork 3k
Add NavigationTransition.to
, exposing the current navigate event's destination
#11692
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
base: main
Are you sure you want to change the base?
Conversation
NavigationTransition.to
, exposing the current navigate event's destination
3336abd
to
50e0a20
Compare
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.
This was easier than I thought it would be, nice.
source
Outdated
<dt><code data-x=""><span data-x="dom-navigation">navigation</span>.<span data-x="dom-Navigation-transition">transition</span>.<span subdfn data-x="dom-NavigationTransition-to">to</span></code></dt> | ||
<dd><p>The <code>NavigationDestination</code> of the transition. This can be useful to compare | ||
against <code data-x="dom-Navigation-currentEntry">navigation.currentEntry</code> before the | ||
navigation is <span data-x="concept-NavigationTransition-committed">committed</span>.</p></dd> |
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.
Nit: "compare against" makes it sound like ===
will work, which it will not. I'm not sure what the best rephrasing is...
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.
Maybe something along the lines of competing the different properties of the entry and destination
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.
Reworded a bit
50e0a20
to
7036eef
Compare
This exposes the destination of an ongoing navigation. Spec PR: whatwg/html#11692 I2P: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/68d4ff4d.2b0a0220.29ae18.0091.GAE%40google.com [email protected] Bug: 447171238 Change-Id: I1d2fbb7c0b7f2656ca4392be4d1beac34d9012ac
This exposes the destination of an ongoing navigation. Spec PR: whatwg/html#11692 I2P: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/68d4ff4d.2b0a0220.29ae18.0091.GAE%40google.com [email protected] Bug: 447171238 Change-Id: I1d2fbb7c0b7f2656ca4392be4d1beac34d9012ac Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6982944 Reviewed-by: Nate Chapin <[email protected]> Commit-Queue: Noam Rosenthal <[email protected]> Cr-Commit-Position: refs/heads/main@{#1520724}
This exposes the destination of an ongoing navigation. Spec PR: whatwg/html#11692 I2P: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/68d4ff4d.2b0a0220.29ae18.0091.GAE%40google.com [email protected] Bug: 447171238 Change-Id: I1d2fbb7c0b7f2656ca4392be4d1beac34d9012ac Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6982944 Reviewed-by: Nate Chapin <[email protected]> Commit-Queue: Noam Rosenthal <[email protected]> Cr-Commit-Position: refs/heads/main@{#1520724}
This exposes the destination of an ongoing navigation. Spec PR: whatwg/html#11692 I2P: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/68d4ff4d.2b0a0220.29ae18.0091.GAE%40google.com [email protected] Bug: 447171238 Change-Id: I1d2fbb7c0b7f2656ca4392be4d1beac34d9012ac Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6982944 Reviewed-by: Nate Chapin <[email protected]> Commit-Queue: Noam Rosenthal <[email protected]> Cr-Commit-Position: refs/heads/main@{#1520724}
@zcorpan can I mark it as "two implementers interested"? People said it was reasonable but I want to make sure. If so, I'll open implementation bugs and fill in the rest of the checkboxes. |
Yes. Thanks! |
Add
NavigationTransition.to
, exposing the currentnavigate
event's destination.This was not necessary before as navigations were committed synchronously, but with precommit handlers this
exposes information about an ongoing navigation.
The destination is set when the
NavigationTransition
object is created, and remains stable throughout.Closes #11690.
(See WHATWG Working Mode: Changes for more details.)
/nav-history-apis.html ( diff )