Add Log domain

Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
Francis Bouvier
2024-04-16 00:48:40 +02:00
parent a708a7f387
commit 626fae0da0
2 changed files with 37 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ const Ctx = server.Cmd;
const browser = @import("browser.zig").browser;
const target = @import("target.zig").target;
const page = @import("page.zig").page;
const log = @import("log.zig").log;
pub const Error = error{
UnknonwDomain,
@@ -26,6 +27,7 @@ const Domains = enum {
Browser,
Target,
Page,
Log,
};
// The caller is responsible for calling `free` on the returned slice.
@@ -55,6 +57,7 @@ pub fn do(
.Browser => browser(alloc, id, iter.next().?, &scanner, ctx),
.Target => target(alloc, id, iter.next().?, &scanner, ctx),
.Page => page(alloc, id, iter.next().?, &scanner, ctx),
.Log => log(alloc, id, iter.next().?, &scanner, ctx),
};
}