You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated README.md to reflect new features and enhancements in version 2.2.1-alpha1, including event object refactoring and UI responsiveness improvements.
# 🚀 What's New in v2.2.1-alpha1 - UI Responsiveness & Refactoring
65
+
## 🚀 What's New in v2.2.1-alpha1 - UI Responsiveness & Refactoring
69
66
70
67
This release marks a major architectural milestone for the library by introducing **Event Object Refactoring**. Key events have been transitioned from passing raw data (strings) to passing full **COM-visible objects**, granting developers absolute control over the application's navigation flow.
71
68
72
-
## ⚡ Key Features & Enhancements
69
+
###⚡ Key Features & Enhancements
73
70
74
-
### 1. Advanced Navigation Control (`IWebView2NavigationStartingEventArgs`)
71
+
####1. Advanced Navigation Control (`IWebView2NavigationStartingEventArgs`)
75
72
Navigation is no longer a passive process.
76
73
With the new `Args` object, you can programmatically intervene in the navigation lifecycle before it even begins.
77
74
@@ -83,14 +80,14 @@ With the new `Args` object, you can programmatically intervene in the navigation
83
80
84
81
-**`NavigationId`**: A unique identifier for precise request tracking across complex web sessions.
85
82
86
-
### 2. Event Object Refactoring & API Maturity
83
+
####2. Event Object Refactoring & API Maturity
87
84
We are moving away from "Raw Parameter" callbacks toward an **Object-Oriented Event Model**.
88
85
89
86
-**Breaking Change**: `OnNavigationStarting` and `OnFrameNavigationStarting` now return an **Args Object**. This change is essential to support bi-directional communication (e.g., AutoIt telling C# to `Cancel = True`).
90
87
91
88
-**Future-Proofing**: Adding new metadata in future WebView2 updates will no longer break existing user code, as new properties will simply be appended to the existing object.
Following the initial alpha release, we identified and resolved a critical issue where Developer Tools (F12) and Right-Click menus could become unresponsive after navigation.
95
92
96
93
-**Interception-Based Locking**: We moved away from toggling engine-level properties (which caused state lag) to a robust **C# Interception Model**. Features are kept "On" at the engine level but are blocked via the `_isLocked` flag in C#, ensuring the "Inspect" menu item never disappears.
@@ -99,7 +96,7 @@ Following the initial alpha release, we identified and resolved a critical issue
99
96
100
97
-**Guaranteed Unlock**: Improved the AutoIt navigation functions (`_NetWebView2_Navigate`) to ensure the browser is always unlocked, even if a navigation times out or fails.
101
98
102
-
### 4. Refactored: OnDownloadStarting Event
99
+
####4. Refactored: OnDownloadStarting Event
103
100
-**Transitioned from a parameter-based signature to a robust, object-oriented argument model.**
104
101
-**New Argument Wrapper**: `IWebView2DownloadStartingEventArgs` provides access to `Uri`, `ResultFilePath`, `Handled`, `Cancel`, `MimeType`, `ContentDisposition`, and `TotalBytesToReceive`.
105
102
@@ -109,21 +106,21 @@ Following the initial alpha release, we identified and resolved a critical issue
109
106
110
107
-**Improved: Download Logic**: Automatic redirection to `_customDownloadPath` is now applied *before* the event fires, allowing **AutoIt** to see and potentially override the final destination.
111
108
112
-
### 5. Refactored: OnDownloadStateChanged Event
109
+
####5. Refactored: OnDownloadStateChanged Event
113
110
-**Transitioned to an object-oriented argument model for consistent event handling.**
provides access to `State`, `Uri`, `TotalBytesToReceive`, `BytesReceived`, and a new `PercentComplete` helper.
116
113
117
114
-**Buffered Property Pattern**: Applied to ensure thread-safe progress updates during rapid download cycles.
118
115
119
-
### 6. Fixed: HTTP Status Code Detection
116
+
####6. Fixed: HTTP Status Code Detection
120
117
- Resolved a bug where `OnWebResourceResponseReceived` failed to fire due to a missing legacy header hack. Replaced with native `ResourceContext` detection.
121
118
122
119
123
-
> [!IMPORTANT]
120
+
> [!CAUTION]
124
121
> **Breaking Change**: If you have custom scripts using `OnWebResourceResponseReceived` or `OnDownloadStateChanged`, please update their signatures to use the new `$oArgs` object as demonstrated in the updated examples.
125
122
126
-
## 🏗️ Architectural Inheritance & Refactoring
123
+
###🏗️ Architectural Inheritance & Refactoring
127
124
128
125
Building on the foundation of v2.1.0, this version further strengthens the **Event Wrapper** hierarchy:
129
126
@@ -139,11 +136,10 @@ Building on the foundation of v2.1.0, this version further strengthens the **Eve
0 commit comments