Compartir a través de


CoreWebView2.SaveFileSecurityCheckStarting Event

Definition

This event will be raised during system FileTypePolicy checking the dangerous file extension list.

public event EventHandler<Microsoft.Web.WebView2.Core.CoreWebView2SaveFileSecurityCheckStartingEventArgs> SaveFileSecurityCheckStarting;
member this.SaveFileSecurityCheckStarting : EventHandler<Microsoft.Web.WebView2.Core.CoreWebView2SaveFileSecurityCheckStartingEventArgs> 
Public Custom Event SaveFileSecurityCheckStarting As EventHandler(Of CoreWebView2SaveFileSecurityCheckStartingEventArgs) 

Event Type

Remarks

Developers can specify their own logic for determining whether to allow a particular type of file to be saved from the document origin URI. Developers can also determine the save decision based on other criteria. Here are two properties in CoreWebView2SaveFileSecurityCheckStartingEventArgs to manage the decision, CancelSave and SuppressDefaultPolicy. Table of Properties' value and result:

CancelSaveSuppressDefaultPolicyResult
FalseFalsePerform the default policy check. It may show the security warning UI if the file extension is dangerous.
FalseTrueSkip the default policy check and the possible security warning. Start saving or downloading.
TrueAnySkip the default policy check and the possible security warning. Abort save or download.

Applies to