-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: emulate
frameStartedNavigating
event (#2879)
Implementation of [Alternative 3. Rely on “Network.requestWillBeSent” CDP event](http://goto.google.com/webdriver:detect-navigation-started#bookmark=id.64balpqrmadv). Required for #2856. Emit `frameStartedNavigating` event on CdpTarget before `Network.requestWillBeSent`.
- Loading branch information
1 parent
34f4caf
commit 43ad1d0
Showing
5 changed files
with
75 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright 2024 Google LLC. | ||
* Copyright (c) Microsoft Corporation. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
/** | ||
* `FrameStartedNavigating` event addressing lack of such an event in CDP. It is emitted | ||
* on CdpTarget before each `Network.requestWillBeSent` event. Note that there can be | ||
* several `Network.requestWillBeSent` events for a single navigation e.g. on redirection, | ||
* so the `FrameStartedNavigating` can be duplicated as well. | ||
* http://go/webdriver:detect-navigation-started#bookmark=id.64balpqrmadv | ||
*/ | ||
export const enum TargetEvents { | ||
FrameStartedNavigating = 'frameStartedNavigating', | ||
} | ||
|
||
export type TargetEventMap = { | ||
[TargetEvents.FrameStartedNavigating]: { | ||
loaderId: string; | ||
url: string; | ||
frameId: string | undefined; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters