v2.2.0-alpha
Version 2.2.0-alpha
Event Object Refactoring (Navigation Interception)
This release refactors key events to use object-based arguments, enabling advanced control like navigation cancellation.
- Breaking Change:
OnNavigationStartingandOnFrameNavigationStartingnow pass anArgsobject instead of a raw URL string. - New Event Argument Wrapper:
IWebView2NavigationStartingEventArgs:Uri: [Property] The target URL.Cancel: [Property] Get/Set boolean to cancel the navigation.IsUserInitiated: [Property] Indicates if the navigation was user-triggered.IsRedirected: [Property] Indicates if it's a redirect.NavigationId: [Property] Unique identifier for the navigation.