Wrap getDocument response in a root object

This commit is contained in:
Karl Seguin
2025-04-08 10:05:32 +08:00
parent 8f4be9b76f
commit 0139437c3d

View File

@@ -51,7 +51,7 @@ fn getDocument(cmd: anytype) !void {
const doc = page.doc orelse return error.DocumentNotLoaded; const doc = page.doc orelse return error.DocumentNotLoaded;
const node = try bc.node_registry.register(parser.documentToNode(doc)); const node = try bc.node_registry.register(parser.documentToNode(doc));
return cmd.sendResult(bc.nodeWriter(node, .{}), .{}); return cmd.sendResult(.{ .root = bc.nodeWriter(node, .{}) }, .{});
} }
// https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-performSearch // https://chromedevtools.github.io/devtools-protocol/tot/DOM/#method-performSearch