requestChildNode cannot have a depth of 0

This commit is contained in:
Karl Seguin
2025-07-17 10:36:20 +08:00
parent 09ca0e6ef0
commit 98b041e84a
2 changed files with 3 additions and 2 deletions

View File

@@ -442,6 +442,7 @@ fn requestChildNodes(cmd: anytype) !void {
pierce: bool = false,
})) orelse return error.InvalidParams;
if (params.depth == 0) return error.InvalidParams;
const bc = cmd.browser_context orelse return error.BrowserContextNotLoaded;
const session_id = bc.session_id orelse return error.SessionIdNotLoaded;
const node = bc.node_registry.lookup_by_id.get(params.nodeId) orelse {