Skip to content

Commit c54b50e

Browse files
Add Browser.setWindowBounds
Signed-off-by: Francis Bouvier <[email protected]>
1 parent aec7455 commit c54b50e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/cdp/browser.zig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const BrowserMethods = enum {
1010
getVersion,
1111
setDownloadBehavior,
1212
getWindowForTarget,
13+
setWindowBounds,
1314
};
1415

1516
pub fn browser(
@@ -25,6 +26,7 @@ pub fn browser(
2526
.getVersion => browserGetVersion(alloc, id, scanner, ctx),
2627
.setDownloadBehavior => browserSetDownloadBehavior(alloc, id, scanner, ctx),
2728
.getWindowForTarget => getWindowForTarget(alloc, id, scanner, ctx),
29+
.setWindowBounds => setWindowBounds(alloc, id, scanner, ctx),
2830
};
2931
}
3032

@@ -103,3 +105,14 @@ fn getWindowForTarget(
103105
};
104106
return result(alloc, id, Resp, Resp{}, content.sessionID.?);
105107
}
108+
109+
fn setWindowBounds(
110+
alloc: std.mem.Allocator,
111+
id: u64,
112+
scanner: *std.json.Scanner,
113+
_: *Ctx,
114+
) ![]const u8 {
115+
// NOTE: noop
116+
const content = try cdp.getContent(alloc, void, scanner);
117+
return result(alloc, id, null, null, content.sessionID);
118+
}

0 commit comments

Comments
 (0)