mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-17 17:38:10 +00:00
Fully fake contextCreated
emit contextCreated when it's needed, not when it actually happens. I thought we could make this sync-up, but we'd need to create 3 contexts to satisfy both puppeteer and chromedp. So rather than having it partially driven by notifications from Browser, I rather just fake it all for now.
This commit is contained in:
@@ -398,16 +398,6 @@ pub fn BrowserContext(comptime CDP_T: type) type {
|
||||
const self: *Self = @alignCast(@ptrCast(ctx));
|
||||
|
||||
switch (notification.*) {
|
||||
.context_created => |cc| if (self.target_id) |target_id| {
|
||||
const aux_data = try std.fmt.allocPrint(self.arena, "{{\"isDefault\":true,\"type\":\"default\",\"frameId\":\"{s}\"}}", .{target_id});
|
||||
self.inspector.contextCreated(
|
||||
self.session.page.?.scope,
|
||||
"",
|
||||
cc.origin,
|
||||
aux_data,
|
||||
true,
|
||||
);
|
||||
},
|
||||
.page_navigate => |*pn| return @import("domains/page.zig").pageNavigate(self, pn),
|
||||
.page_navigated => |*pn| return @import("domains/page.zig").pageNavigated(self, pn),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user