mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 16:28:58 +00:00
events: create an EventHandlerData struct
It simplifies the EventHandlerFunc creation and allows to insert user's data.
This commit is contained in:
@@ -52,9 +52,9 @@ pub const XMLHttpRequestEventTarget = struct {
|
||||
@as(*parser.EventTarget, @ptrCast(self)),
|
||||
alloc,
|
||||
typ,
|
||||
cbk,
|
||||
false,
|
||||
EventHandler,
|
||||
.{ .cbk = cbk },
|
||||
false,
|
||||
);
|
||||
}
|
||||
fn unregister(self: *XMLHttpRequestEventTarget, alloc: std.mem.Allocator, typ: []const u8, cbk: Callback) !void {
|
||||
|
||||
Reference in New Issue
Block a user