Remarque
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de vous connecter ou de modifier des répertoires.
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de modifier des répertoires.
Event args for the CoreWebView2.LaunchingExternalUriScheme event.
Summary
| Members | Description |
|---|---|
| Cancel | Determines whether to cancel the navigation. |
| Handled | Indicates whether a CoreWebView2Frame event handler has handled this CoreWebView2Frame.LaunchingExternalUriScheme event. Defaults to false. |
| InitiatingOrigin | Gets the origin initiating the external URI scheme launch. If the InitiatingOrigin is opaque, the InitiatingOrigin reported in the event args will be its precursor origin. The precursor origin is the origin that created the opaque origin. For example, if a frame on example.com opens a subframe with a different opaque origin, the subframe's precursor origin is example.com. |
| IsUserInitiated | true when the launching external URI scheme request was initiated through a user gesture. |
| Uri | Gets the URI with the external URI scheme to be launched. |
| GetDeferral | Gets a Deferral object and puts the event into a deferred state. |
Properties
Cancel
bool Cancel
Determines whether to cancel the navigation.
Handled
bool Handled
Indicates whether a CoreWebView2Frame event handler has handled this CoreWebView2Frame.LaunchingExternalUriScheme event. Defaults to false.
By default, the CoreWebView2Frame.LaunchingExternalUriScheme and CoreWebView2.LaunchingExternalUriScheme event handlers are all invoked, with the CoreWebView2Frame event handlers invoked first, innermost frame first for nested iframes. The host may set this property to true within a CoreWebView2Frame event handler to prevent the remaining ancestor CoreWebView2Frame and CoreWebView2 event handlers from being invoked. Setting Handled has no effect when the event is raised on CoreWebView2; it only suppresses the remaining handlers when set from a frame-level event handler.
InitiatingOrigin
readonly string InitiatingOrigin
Gets the origin initiating the external URI scheme launch. If the InitiatingOrigin is opaque, the InitiatingOrigin reported in the event args will be its precursor origin. The precursor origin is the origin that created the opaque origin. For example, if a frame on example.com opens a subframe with a different opaque origin, the subframe's precursor origin is example.com.
The origin will be an empty string if the request is initiated by calling CoreWebView2.Navigate on the external URI scheme. If a script initiates the navigation, the InitiatingOrigin will be the top-level document's Source, i.e. if window.location is set to "calculator://", the InitiatingOriginwill be set tocalculator://. If the request is initiated from a child frame, the InitiatingOrigin` will be the source of that child frame.
IsUserInitiated
readonly bool IsUserInitiated
true when the launching external URI scheme request was initiated through a user gesture.
Uri
readonly string Uri
Gets the URI with the external URI scheme to be launched.
Methods
GetDeferral
Deferral GetDeferral()
Gets a Deferral object and puts the event into a deferred state. Use this to Complete the launching external URI scheme request at a later time.