mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
Add page_life_cycle_events in CDP state
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
@@ -77,6 +77,8 @@ pub const State = struct {
|
||||
securityOrigin: []const u8 = URLBase,
|
||||
secureContextType: []const u8 = "Secure", // TODO: enum
|
||||
loaderID: []const u8 = LoaderID,
|
||||
|
||||
page_life_cycle_events: bool = false, // TODO; Target based value
|
||||
};
|
||||
|
||||
// Utils
|
||||
|
||||
@@ -89,7 +89,7 @@ fn setLifecycleEventsEnabled(
|
||||
alloc: std.mem.Allocator,
|
||||
id: u64,
|
||||
scanner: *std.json.Scanner,
|
||||
_: *Ctx,
|
||||
ctx: *Ctx,
|
||||
) ![]const u8 {
|
||||
|
||||
// input
|
||||
@@ -99,8 +99,9 @@ fn setLifecycleEventsEnabled(
|
||||
_ = try getParams(alloc, Params, scanner);
|
||||
const sessionID = try cdp.getSessionID(scanner);
|
||||
|
||||
ctx.state.page_life_cycle_events = true;
|
||||
|
||||
// output
|
||||
// TODO: dummy
|
||||
return result(alloc, id, null, null, sessionID);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user