mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
cdp: add target.detachFromTarget noop
This commit is contained in:
@@ -39,6 +39,7 @@ const Methods = enum {
|
|||||||
createTarget,
|
createTarget,
|
||||||
closeTarget,
|
closeTarget,
|
||||||
sendMessageToTarget,
|
sendMessageToTarget,
|
||||||
|
detachFromTarget,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn target(
|
pub fn target(
|
||||||
@@ -60,6 +61,7 @@ pub fn target(
|
|||||||
.createTarget => createTarget(alloc, msg, ctx),
|
.createTarget => createTarget(alloc, msg, ctx),
|
||||||
.closeTarget => closeTarget(alloc, msg, ctx),
|
.closeTarget => closeTarget(alloc, msg, ctx),
|
||||||
.sendMessageToTarget => sendMessageToTarget(alloc, msg, ctx),
|
.sendMessageToTarget => sendMessageToTarget(alloc, msg, ctx),
|
||||||
|
.detachFromTarget => detachFromTarget(alloc, msg, ctx),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -496,3 +498,18 @@ fn sendMessageToTarget(
|
|||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// noop
|
||||||
|
fn detachFromTarget(
|
||||||
|
alloc: std.mem.Allocator,
|
||||||
|
msg: *IncomingMessage,
|
||||||
|
_: *Ctx,
|
||||||
|
) ![]const u8 {
|
||||||
|
// input
|
||||||
|
const input = try Input(void).get(alloc, msg);
|
||||||
|
defer input.deinit();
|
||||||
|
log.debug("Req > id {d}, method {s}", .{ input.id, "target.detachFromTarget" });
|
||||||
|
|
||||||
|
// output
|
||||||
|
return result(alloc, input.id, bool, true, input.sessionId);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user