Skip to content

Commit 41bd370

Browse files
committed
update lightpanda and wpt URL usage
1 parent be75b5b commit 41bd370

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/telemetry/lightpanda.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ pub const LightPanda = struct {
102102
try writer.writeByte('\n');
103103
}
104104

105-
var req = try self.client.request(.POST, self.uri);
105+
var req = try self.client.request(.POST, &self.uri);
106106
defer req.deinit();
107107
req.body = arr.items;
108108

src/wpt/run.zig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const parser = @import("netsurf");
2626
const jsruntime = @import("jsruntime");
2727
const Loop = jsruntime.Loop;
2828
const Env = jsruntime.Env;
29+
const URL = @import("../url.zig").URL;
2930
const browser = @import("../browser/browser.zig");
3031
const Window = @import("../html/window.zig").Window;
3132
const storage = @import("../storage/storage.zig");
@@ -66,12 +67,14 @@ pub fn run(arena: *std.heap.ArenaAllocator, comptime dir: []const u8, f: []const
6667
defer renderer.elements.deinit(alloc);
6768
defer renderer.positions.deinit(alloc);
6869

70+
const url = try URL.parse("https://lightpanda.io", null);
71+
6972
var js_env: Env = undefined;
7073
Env.init(&js_env, alloc, &loop, UserContext{
74+
.url = &url,
7175
.document = html_doc,
7276
.cookie_jar = &cookie_jar,
7377
.http_client = &http_client,
74-
.uri = try std.Uri.parse("https://lightpanda.io"),
7578
.renderer = &renderer,
7679
});
7780
defer js_env.deinit();

0 commit comments

Comments
 (0)