Skip to content

Commit f0906fb

Browse files
authored
Update IsSmartScreenEnabled
1 parent 9c281ae commit f0906fb

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

specs/IsSmartScreenEnabled

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@
22

33
[Edge SmartScreen](https://docs.microsoft.com/en-us/deployedge/microsoft-edge-security-smartscreen) helps you identify reported phishing and malware websites, and also helps you make informed decisions about downloads.
44

5-
In the current version of the Edge browser, users can switch the state of SmartScreen at any time. However, the webview2 application can only be set at initialization. In order to add more flexibility to the webview2 application. This API is added to keep the SmartScreen setting consistent with the browser. Development Users can control the status of SmartScreen at any time.
5+
Currently, users can use `options->put_AdditionalBrowserArguments(L"--disable-features=msSmartScreenProtection")` to control SmartScreen in the WebView2 application. It is essentially a startup parameter of the browser process. It must be determined when the WebView2Environment is created. And Cannot be modified at runtime.
6+
7+
To support more flexibility. We introduce a new API.
68

79
In this document we describe the new setting. We'd appreciate your feedback.
810

911

1012
# Description
11-
The configuration of SmartScreen is stored in the user data folder. So its configuration is bound to the environment. Users can use ICoreWebView2Environment to control it.
13+
Users can use ICoreWebView2Environment to control it.When it is changed, all WebView2 applications using the same path of the user data folder will be changed.
1214

13-
The default value for `IsSmartScreenEnabled` is `true`.
15+
The default value for `IsSmartScreenEnabled` is `true`,and defaults are always reset when the app is restarted
1416
When this setting is set to `false`, It will turn off SmartScreen protection when visiting web pages.
1517

16-
Disabling/Enabling `IsSmartScreenEnabled` will take effect immediately.
18+
Changes to `IsSmartScreenEnabled` does not take effect until the next navigation.
1719

1820

1921
# Examples
@@ -60,14 +62,13 @@ interface ICoreWebView2Environment11 : ICoreWebView2Environment10 {
6062
/// All WebViews using the same user data folder share the same SmartScreen setting.
6163
/// When it is changed, the change will be applied to all WebViews using the
6264
/// same user data folder.
65+
/// Because SmartScreen helps protect your users from phishing and malware,
66+
/// we do not recommend turning it off unless you know your app is only loading
67+
/// web content you control and trust.
6368
/// \snippet SettingsComponent.cpp ToggleSmartScreenEnabled.
64-
/// Get the IsSmartScreenEnabled property needs to be used after
65-
/// CreateCoreWebView2Controller is called.Otherwise return E_ACCESSDENIED.
6669
[propget] HRESULT IsSmartScreenEnabled([out, retval] BOOL* value);
6770

6871
/// Set the IsSmartScreenEnabled property.
69-
/// This configuration will be saved.
70-
/// The configuration from the last exit will be used on the next open
7172
[propput] HRESULT IsSmartScreenEnabled([in] BOOL value);
7273

7374
}

0 commit comments

Comments
 (0)