Skip to content

Commit 1fcc168

Browse files
committed
cdp: add target.detachFromTarget noop
1 parent aec2675 commit 1fcc168

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/cdp/target.zig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const Methods = enum {
3838
disposeBrowserContext,
3939
createTarget,
4040
closeTarget,
41+
detachFromTarget,
4142
};
4243

4344
pub fn target(
@@ -58,6 +59,7 @@ pub fn target(
5859
.disposeBrowserContext => disposeBrowserContext(alloc, msg, ctx),
5960
.createTarget => createTarget(alloc, msg, ctx),
6061
.closeTarget => closeTarget(alloc, msg, ctx),
62+
.detachFromTarget => detachFromTarget(alloc, msg, ctx),
6163
};
6264
}
6365

@@ -424,3 +426,18 @@ fn closeTarget(
424426

425427
return "";
426428
}
429+
430+
// noop
431+
fn detachFromTarget(
432+
alloc: std.mem.Allocator,
433+
msg: *IncomingMessage,
434+
_: *Ctx,
435+
) ![]const u8 {
436+
// input
437+
const input = try Input(void).get(alloc, msg);
438+
defer input.deinit();
439+
log.debug("Req > id {d}, method {s}", .{ input.id, "target.detachFromTarget" });
440+
441+
// output
442+
return result(alloc, input.id, bool, true, input.sessionId);
443+
}

0 commit comments

Comments
 (0)