Skip to content

v2.0.0-stable

Choose a tag to compare

@ioa747 ioa747 released this 17 Feb 07:54
· 154 commits to main since this release
c806300

Current Version: Version 2.0.0-stable


Patch: Enriched Verbose Logging

Diagnostic Visibility & Traceability

This patch significantly enhances the Verbose diagnostic mode with a new format and comprehensive event logging.

  • New Log Format: Introduced a high-visibility prefix and instance tracking.
    • Format: +++[NetWebView2Lib][HANDLE:0x...][HH:mm:ss.fff] Message
    • Traceability: The ParentWindowHandle is now included in every log line, allowing developers to distinguish logs between multiple concurrent WebView2 instances.
  • Enriched Event Logging: Added diagnostic traces to all critical lifecycle events:
    • Navigation: NavigationStarting (Target URI), NavigationCompleted (Success/Error Status), SourceChanged (New URL).
    • Interaction: ContextMenuRequested (Location & Target Kind), WebMessageReceived (Raw payload).
    • Networking: WebResourceRequested (URI & Context), WebResourceResponseReceived (Status Code & Reason), BasicAuthenticationRequested (URI).
    • State: GotFocus, LostFocus (including True vs. Internal check), ProcessFailed (Kind & Reason), NewWindowRequested (Target URI).
  • API Method Logging: Added traces for key API calls:
    • Navigate, ExecuteScript (with content truncation), PostWebMessage.
    • AddExtension, RemoveExtension (with Path/ID logging).
  • Default Folder Sync: Renamed the default failure report folder from Crashes to FailureReportFolder to align with official WebView2 parameter naming conventions.
  • Indentation & Integrity: Standardized the logging calls within event lambdas to maintain clean source code.

Patch: Compiler Scope & Null Check Optimization

Maintenance & Code Health

  • Fixed CS0136: Resolved variable redeclaration scope conflicts in the WebResourceResponseReceived event handler.
  • Improved Null Safety: Refactored the response handler to proactively check for e.Response availability, preventing potential exceptions.
  • Simplified Cleanup (IDE0031): Implemented the null-conditional operator (?.) in the Cleanup() method for more concise and modern C# syntax.

Version 2.0.0-stable

COM Standardizing & Consistency (Major Release)

This release establishes a consistent naming convention for COM objects while ensuring 100% backward compatibility for legacy scripts.

  • Standardized Naming (Architecture):
    • Renamed internal classes and ProgIDs to follow the NetWebView2Lib.WebView2{Subsystem} pattern.
    • WebView2Manager: New ProgID NetWebView2Lib.WebView2Manager (formerly NetWebView2.Manager).
    • WebView2Bridge: New ProgID NetWebView2Lib.WebView2Bridge (formerly NetWebView2Lib.WebViewBridge).
    • WebView2Parser: New ProgID NetWebView2Lib.WebView2Parser (formerly NetJson.Parser).
  • Compatibility Layer:
    • Implemented inheritance-based compatibility. Creating objects using old ProgIDs still works perfectly but uses the new logic internally.
  • AutoIt UDF Sync:
    • NetWebView2Lib.au3 updated to use the new standardized ProgIDs by default. This ensures that ObjName() reports the consistent professional naming for new projects using the UDF.
  • Project Structure:
    • Renamed C# core files for consistency: WebView2Manager.cs, WebView2Bridge.cs, WebView2Parser.cs.
  • IFrame HTML Extraction: High-performance extraction of HTML from cross-origin iframes.
  • SDK Resilience (Reflection): Added reflection-based fallback for CoreWebView2Frame.Uri to maintain compatibility across different WebView2 SDK versions.
  • SDK Locking Policy (Standardization):
    • NuGet Version: Locked to 1.0.2739.15 (Release Date: August 26, 2024).
    • Rationale: This version ensures maximum compatibility across the "Evergreen" cycle on most Windows installations while providing all necessary features (Frames, Basic Auth, Process Failure events).
    • Runtime Requirement: Requires WebView2 Runtime 128.0.2739.15 or higher.
    • Runtime Validation: Register_web2.au3 now performs a strict check for the minimum required runtime version.
  • DispId Normalization: Resolved DispId conflict for Verbose mode (now DispId 228).