Communicate page navigation state via notifications #520
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#516 needs a way for the page/session to communicate with CDP (i.e. the client). This adds a very simple mechanism for the page/session to callback into CDP.
The
Page.navigateCDP message has been changed to use the new notification appraoch. Page.navigate just signals the navigation request, and it's only via notifications from the page/session that page lifecycle events are sent back to the client.I know this isn't the holistic event system that we want. This isn't something that the HTTP client can use to emit events nor is it something that telemetry can register listeners with. My goal is to get clicks working (from mouse events and javascript), then add some type of integration testing. Most of our recent additions don't have great code coverage, and events are hard to unit test. So I think this is the right time to add something to help increase our coverage around these more complicated cases.