Skip to content

v2.2.1-alpha1

Latest

Choose a tag to compare

@ioa747 ioa747 released this 17 Apr 19:45
· 2 commits to main since this release
f3b494e

Version 2.2.1-alpha1

Critical UI Responsiveness & Locking Fixes

  • Fixed: Unresponsive F12 & Context Menu: Resolved a critical issue where Developer Tools and Right-Click menus would become unresponsive or "missing" (Inspect) after navigation.
    • Root Cause: Identified as COM overhead during dual event sink processing and synchronous state lag when toggling engine properties.
  • Improved: Interception-Based Locking: Refactored LockWebView / UnLockWebView to be 100% reliable.
    • Instead of toggling engine settings (which caused UI flickering), the library now stays permanently "Open" at the engine level but intercepts and blocks events via the _isLocked flag in C#.
  • C# Fast Path Optimization: F12 and basic context menus are now handled directly in C# whenever possible, bypassing the AutoIt COM layer for instant response times.
  • Robust AutoIt Navigation: _NetWebView2_Navigate and _NetWebView2_NavigateToString now use a guaranteed UnLockWebView pattern, preventing the browser from remaining locked on navigation errors.
  • Refactored: OnDownloadStarting Event: Transitioned from a parameter-based signature to a robust, object-oriented argument model.
    • New Argument Wrapper: IWebView2DownloadStartingEventArgs provides access to Uri, ResultFilePath, Handled, Cancel, MimeType, ContentDisposition, and TotalBytesToReceive.
    • Hybrid Deferral Model: Implemented a performance-optimized synchronization mechanism using CoreWebView2Deferral. The C# core now waits up to 5000ms for AutoIt to set Handled or Cancel on the argument object, proceeding immediately once a decision is made.
    • MimeType Support (Issue #123): Exposed MimeType directly in the download arguments, allowing AutoIt scripts to identify "unviewable content" (e.g., PDFs, ZIPs) at the start of the download lifecycle.
  • Refactored: OnWebResourceResponseReceived Event: Transitioned to an object-oriented argument model for consistent event handling.
    • New Argument Wrapper: IWebView2WebResourceResponseReceivedEventArgs provides access to StatusCode, ReasonPhrase, RequestUri, and IsDocument.
    • Buffered Property Pattern: Applied to ensure thread-safe access from AutoIt (STA/COM compatibility).
    • Refactored: OnDownloadStateChanged Event: Transitioned to an object-oriented argument model for consistent event handling.
    • New Argument Wrapper: IWebView2DownloadStateChangedEventArgs provides access to State, Uri, TotalBytesToReceive, BytesReceived, and a new PercentComplete helper.
    • Buffered Property Pattern: Applied to ensure thread-safe progress updates during rapid download cycles.
  • Fixed: HTTP Status Code Detection: Resolved a bug where OnWebResourceResponseReceived failed to fire due to a missing legacy header hack. Replaced with native ResourceContext detection.
  • Improved: Download Logic: Automatic redirection to _customDownloadPath is now applied before the event fires, allowing AutoIt to see and potentially override the final destination.