mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 23:23:28 +00:00
Communicate page navigation state via notifications
In order to support click handling on anchors from JavaScript, we need some hook from the page/session to the CDP instance. This first phase adds notifications in page.navigate, as well as a primitive notification hook to the session. CDP's existing Page.navigate uses this new notifiation system.
This commit is contained in:
11
src/notification.zig
Normal file
11
src/notification.zig
Normal file
@@ -0,0 +1,11 @@
|
||||
const URL = @import("url.zig").URL;
|
||||
|
||||
pub const Notification = union(enum) {
|
||||
page_navigate: PageEvent,
|
||||
page_navigated: PageEvent,
|
||||
|
||||
pub const PageEvent = struct {
|
||||
ts: u32,
|
||||
url: *const URL,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user