mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
Tweak CDP startup messages.
1 - When Target.setAutoAttach is called, send the `Target.attachedToTarget`
event before sending the response. This matches Chrome's behavior and
it stops playwright from thinking there's no target and making extra calls,
e.g. to Target.attachedToTarget.
2 - Use the same dummy frameId for all startup messages. I'm not sure why we
have STARTUP-P and STARTUP-B. Using the same frame (a) makes more sense to
me (b) doesn't break any existing integration tests, and (c) improves this
scenario: https://github.com/lightpanda-io/browser/issues/1800
This commit is contained in:
@@ -196,7 +196,7 @@ pub fn CDPT(comptime TypeProvider: type) type {
|
||||
return command.sendResult(.{
|
||||
.frameTree = .{
|
||||
.frame = .{
|
||||
.id = "TID-STARTUP-B",
|
||||
.id = "TID-STARTUP",
|
||||
.loaderId = "LOADERID24DD2FD56CF1EF33C965C79C",
|
||||
.securityOrigin = URL_BASE,
|
||||
.url = "about:blank",
|
||||
|
||||
Reference in New Issue
Block a user