-
Notifications
You must be signed in to change notification settings - Fork 32
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
fix: fix navigation events #1850
base: main
Are you sure you want to change the base?
Conversation
5c3e942
to
697526a
Compare
this.#eventManager.registerEvent( | ||
{ | ||
type: 'event', | ||
method: ChromiumBidi.BrowsingContext.EventNames.NavigationStarted, |
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.
The PR title is misleading. #documentChanged
is called after CDP call Page.navigate
or after Page.lifecycleEvent: init
, and has nothing to do with requestWillBeSent
.
cd49ab6
to
1eafaf4
Compare
requestWillBeSent
for navigation started8655535
to
33dda82
Compare
33dda82
to
0e98a68
Compare
We need to wait till w3c/webdriver-bidi#662 resolves. Currently, CDP doesn't have an event that emits only for non-same-document navigation. Combinations of events also do not work. The closest event is https://chromium-review.googlesource.com/c/chromium/src/+/5300245 implements an event that captures all navigations (which is still technically not spec-compliant). If w3c/webdriver-bidi#657 resolves to emit |
This PR swaps out the deferred promises for event emission and uses a combination of
init
andrequestWillBeSent
fornavigationStarted
. We also introduce random UUIDs for fragment navigation.Closes #1858