Add Page.getFrameTree

Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
Francis Bouvier
2024-04-16 00:48:17 +02:00
parent b1242207a9
commit a708a7f387

View File

@@ -8,6 +8,7 @@ const stringify = @import("cdp.zig").stringify;
const PageMethods = enum { const PageMethods = enum {
enable, enable,
getFrameTree,
}; };
pub fn page( pub fn page(
@@ -21,6 +22,7 @@ pub fn page(
return error.UnknownMethod; return error.UnknownMethod;
return switch (method) { return switch (method) {
.enable => enable(alloc, id, scanner, ctx), .enable => enable(alloc, id, scanner, ctx),
.getFrameTree => getFrameTree(alloc, id, scanner, ctx),
}; };
} }
@@ -32,3 +34,13 @@ fn enable(
) ![]const u8 { ) ![]const u8 {
return result(alloc, id, null, null); return result(alloc, id, null, null);
} }
fn getFrameTree(
alloc: std.mem.Allocator,
id: u64,
_: *std.json.Scanner,
_: *Ctx,
) ![]const u8 {
// TODO: dummy
return result(alloc, id, null, null);
}