Skip to content

v2.1.0-alpha

Latest

Choose a tag to compare

@ioa747 ioa747 released this 23 Feb 19:07
· 30 commits to main since this release
c205bf7

Version 2.1.0-alpha

Frame Object Enrichment & Permission Events

This release enriches the WebView2Frame COM object and adds page-level permission handling.

  • New Frame Properties (IWebView2Frame):

    • FrameId: (DispId 9) [Property] Returns the unique identifier of the frame (assigned by the browser).
    • Source: (DispId 10) [Property] Returns the current URL of the frame. Uses reflection-based SDK-independent retrieval.
  • New Manager Method (WebView2Manager):

    • GetFrameById(frameId): (DispId 230) [Method] Returns a WebView2Frame COM object matching the specified FrameId. Returns Null if not found.
  • New Events:

    • OnPermissionRequested: (DispId 239) [Event] Fired when the page requests a permission (Geolocation, Camera, Microphone, etc.). Provides PermissionKind, State, Uri, IsUserInitiated, Handled, and deferral support via GetDeferral()/Complete().
    • OnFramePermissionRequested: (DispId 238) [Event] Frame-level variant of the above, also passes the IWebView2Frame object.
  • Frame Event DispId Assignments:

    • OnFrameCreated (234), OnFrameDestroyed (235), OnFrameNameChanged (236), OnFramePermissionRequested (238).