We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10fc056 commit 9c83b26Copy full SHA for 9c83b26
src/browser/events/custom_event.zig
@@ -64,7 +64,7 @@ pub const CustomEvent = struct {
64
event_type: []const u8,
65
can_bubble: bool,
66
cancelable: bool,
67
- detail: ?JsObject,
+ maybe_detail: ?JsObject,
68
) !void {
69
// This function can only be called after the constructor has called.
70
// So we assume proto is initialized already by constructor.
@@ -73,7 +73,9 @@ pub const CustomEvent = struct {
73
self.proto.cancelable = cancelable;
74
self.proto.is_initialised = true;
75
// Detail is stored separately.
76
- self.detail = detail;
+ if (maybe_detail) |detail| {
77
+ self.detail = try detail.persist();
78
+ }
79
}
80
};
81
0 commit comments