Skip to content

Feat: Add navigation-starting interception and handlers - #386

Merged
AnnaSasDev merged 5 commits into
corefrom
294-feature-intercept-navigation-events-2
Aug 4, 2026
Merged

Feat: Add navigation-starting interception and handlers#386
AnnaSasDev merged 5 commits into
corefrom
294-feature-intercept-navigation-events-2

Conversation

@AnnaSasDev

Copy link
Copy Markdown
Member

Closes #294

Introduce pre-navigation interception across managed and native layers. Adds CppNavigationStartingDelegate and NavigationStartingCallback, a NavigationStartingHandler in InfiniFrameInitParams, marshalling support, and platform integrations (Windows WebView2, macOS WKWebView, Linux WebKit) to allow callbacks to cancel navigations. Adds NavigationStartingEventArgs and NavigationStartingResult, event store support, RegisterNavigationStartingHandler extension, docs describing usage/platform notes, and unit tests validating handler invocation and cancellation behavior.
@AnnaSasDev AnnaSasDev linked an issue Aug 3, 2026 that may be closed by this pull request
2 tasks
@AnnaSasDev AnnaSasDev self-assigned this Aug 3, 2026
Wrap navigation URL C-strings with AutoString before calling the navigation callback on Linux and macOS to ensure proper ownership/lifetime. Changes applied in WindowSignals.Gtk.cpp (on_webview_decide_policy) and NavigationDelegate.mm (navigation handler) — behavior unchanged, prevents potential dangling pointer/ownership issues when callbacks store or use the passed string.
@AnnaSasDev
AnnaSasDev merged commit a001e38 into core Aug 4, 2026
55 checks passed
@AnnaSasDev
AnnaSasDev deleted the 294-feature-intercept-navigation-events-2 branch August 4, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature | Intercept navigation events

1 participant