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 aWebView2FrameCOM object matching the specifiedFrameId. ReturnsNullif not found.
-
New Events:
OnPermissionRequested: (DispId 239) [Event] Fired when the page requests a permission (Geolocation, Camera, Microphone, etc.). ProvidesPermissionKind,State,Uri,IsUserInitiated,Handled, and deferral support viaGetDeferral()/Complete().OnFramePermissionRequested: (DispId 238) [Event] Frame-level variant of the above, also passes theIWebView2Frameobject.
-
Frame Event DispId Assignments:
OnFrameCreated(234),OnFrameDestroyed(235),OnFrameNameChanged(236),OnFramePermissionRequested(238).