mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
Add network.setCacheDisabled
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
@@ -9,6 +9,7 @@ const stringify = cdp.stringify;
|
|||||||
|
|
||||||
const NetworkMethods = enum {
|
const NetworkMethods = enum {
|
||||||
enable,
|
enable,
|
||||||
|
setCacheDisabled,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn network(
|
pub fn network(
|
||||||
@@ -23,6 +24,7 @@ pub fn network(
|
|||||||
|
|
||||||
return switch (method) {
|
return switch (method) {
|
||||||
.enable => networkEnable(alloc, id, scanner, ctx),
|
.enable => networkEnable(alloc, id, scanner, ctx),
|
||||||
|
.setCacheDisabled => networkSetCacheDisabled(alloc, id, scanner, ctx),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,3 +38,14 @@ fn networkEnable(
|
|||||||
|
|
||||||
return result(alloc, id orelse msg.id.?, null, null, msg.sessionID);
|
return result(alloc, id orelse msg.id.?, null, null, msg.sessionID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn networkSetCacheDisabled(
|
||||||
|
alloc: std.mem.Allocator,
|
||||||
|
id: ?u16,
|
||||||
|
scanner: *std.json.Scanner,
|
||||||
|
_: *Ctx,
|
||||||
|
) ![]const u8 {
|
||||||
|
const msg = try getMsg(alloc, void, scanner);
|
||||||
|
|
||||||
|
return result(alloc, id orelse msg.id.?, null, null, msg.sessionID);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user