mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-07-31 09:46:05 -04:00
don't skip dispose dispatch when ondispose is unset
This commit is contained in:
@@ -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