void onHistoryChanged(bool canGoBack, bool canGoForward) { assert(!_closed); _onHistoryChanged?.call(canGoBack, canGoForward); }