Tweak wait_until option

Small tweaks to https://github.com/lightpanda-io/browser/pull/1896

Improve the wait ergonomics with an Option with default parameter. Revert
page pointer logic to original (don't think that change was necessary).
This commit is contained in:
Karl Seguin
2026-03-19 20:29:20 +08:00
parent e2be8525c4
commit a4cb5031d1
8 changed files with 25 additions and 18 deletions

View File

@@ -108,7 +108,7 @@ pub fn fetch(app: *App, url: [:0]const u8, opts: FetchOpts) !void {
.reason = .address_bar,
.kind = .{ .push = null },
});
_ = session.wait(opts.wait_ms, opts.wait_until);
_ = session.wait(.{ .timeout_ms = opts.wait_ms, .until = opts.wait_until });
const writer = opts.writer orelse return;
if (opts.dump_mode) |mode| {