mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-09-30 16:34:56 -04:00
don't skip dispose dispatch when ondispose is unset
This commit is contained in:
1 file changed
+1
-2
@@ -82,10 +82,9 @@ pub fn getState(self: *const NavigationHistoryEntry, frame: *Frame) !StateReturn
|
||||
|
||||
pub fn fireDispose(self: *NavigationHistoryEntry, frame: *Frame) !void {
|
||||
if (!frame.hasDirectListeners(self.asEventTarget(), "dispose", self._on_dispose)) return;
|
||||
if (self._on_dispose == null) return;
|
||||
|
||||
const event = try Event.initTrusted(comptime .wrap("dispose"), .{}, frame._page);
|
||||
try frame.dispatch(self.asEventTarget(), event, self._on_dispose.?, .{ .context = "NavigationHistoryEntry" });
|
||||
try frame.dispatch(self.asEventTarget(), event, self._on_dispose, .{ .context = "NavigationHistoryEntry" });
|
||||
}
|
||||
|
||||
fn getOnDispose(self: *const NavigationHistoryEntry) ?js.Function.Global {
|
||||
|
||||
Reference in new issue
Block a user