isolated polyfill + create when needed

This commit is contained in:
sjorsdonkers
2025-05-02 10:56:25 +02:00
parent d9f21e0475
commit 8930e2f06e
6 changed files with 70 additions and 22 deletions

View File

@@ -55,18 +55,24 @@ pub const Notification = struct {
node_pool: std.heap.MemoryPool(Node),
const EventListeners = struct {
page_remove: List = .{},
page_created: List = .{},
page_navigate: List = .{},
page_navigated: List = .{},
notification_created: List = .{},
};
const Events = union(enum) {
page_remove: PageRemove,
page_created: *browser.Page,
page_navigate: *const PageNavigate,
page_navigated: *const PageNavigated,
notification_created: *Notification,
};
const EventType = std.meta.FieldEnum(Events);
pub const PageRemove = struct {};
pub const PageNavigate = struct {
timestamp: u32,
url: *const URL,