mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-07-31 01:36:15 -04:00
clear callbacks on onRemoveFrame for Navigation
This commit is contained in:
@@ -56,7 +56,12 @@ fn asEventTarget(self: *Navigation) *EventTarget {
|
||||
|
||||
pub fn onRemoveFrame(self: *Navigation) void {
|
||||
self._proto = undefined;
|
||||
if (self._on_currententrychange) |cb| cb.release();
|
||||
self._on_currententrychange = null;
|
||||
|
||||
for (self._entries.items) |entry| {
|
||||
if (entry._on_dispose) |cb| cb.release();
|
||||
entry._on_dispose = null;
|
||||
entry._proto = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user