mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 22:53:28 +00:00
Return sessionId in Emulation.setFocusEmulationEnabled
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
@@ -2,9 +2,10 @@ const std = @import("std");
|
||||
|
||||
const server = @import("../server.zig");
|
||||
const Ctx = server.Cmd;
|
||||
const result = @import("cdp.zig").result;
|
||||
const getParams = @import("cdp.zig").getParams;
|
||||
const stringify = @import("cdp.zig").stringify;
|
||||
const cdp = @import("cdp.zig");
|
||||
const result = cdp.result;
|
||||
const getParams = cdp.getParams;
|
||||
const stringify = cdp.stringify;
|
||||
|
||||
const EmulationMethods = enum {
|
||||
setEmulatedMedia,
|
||||
@@ -38,8 +39,18 @@ fn setEmulatedMedia(
|
||||
fn setFocusEmulationEnabled(
|
||||
alloc: std.mem.Allocator,
|
||||
id: u64,
|
||||
_: *std.json.Scanner,
|
||||
scanner: *std.json.Scanner,
|
||||
_: *Ctx,
|
||||
) ![]const u8 {
|
||||
return result(alloc, id, null, null, null);
|
||||
|
||||
// input
|
||||
const Params = struct {
|
||||
enabled: bool,
|
||||
};
|
||||
_ = try getParams(alloc, Params, scanner);
|
||||
const sessionID = try cdp.getSessionID(scanner);
|
||||
|
||||
// output
|
||||
// TODO: dummy
|
||||
return result(alloc, id, null, null, sessionID);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user