mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
Use per-cdp connection HttpClient
This commit is contained in:
@@ -28,6 +28,7 @@ const js = @import("../browser/js/js.zig");
|
||||
const App = @import("../App.zig");
|
||||
const Browser = @import("../browser/Browser.zig");
|
||||
const Session = @import("../browser/Session.zig");
|
||||
const HttpClient = @import("../http/Client.zig");
|
||||
const Page = @import("../browser/Page.zig");
|
||||
const Incrementing = @import("../id.zig").Incrementing;
|
||||
const Notification = @import("../Notification.zig");
|
||||
@@ -84,10 +85,11 @@ pub fn CDPT(comptime TypeProvider: type) type {
|
||||
|
||||
const Self = @This();
|
||||
|
||||
pub fn init(app: *App, client: TypeProvider.Client) !Self {
|
||||
pub fn init(app: *App, http_client: *HttpClient, client: TypeProvider.Client) !Self {
|
||||
const allocator = app.allocator;
|
||||
const browser = try Browser.init(app, .{
|
||||
.env = .{ .with_inspector = true },
|
||||
.http_client = http_client,
|
||||
});
|
||||
errdefer browser.deinit();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user