Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

When to set IsReputationCheckingRequired?

Post Reply
RaelB
Posts: 26
Joined: Sun Feb 12, 2017 11:22 am

When to set IsReputationCheckingRequired?

Post by RaelB »

Hi,

Is there any specific place to set or not set WVBrowser.IsReputationCheckingRequired?

I am doing so in AfterCreated event.

Thanks
User avatar
salvadordf
Posts: 4304
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: When to set IsReputationCheckingRequired?

Post by salvadordf »

Hi,

That property is set in the next navigation.

https://github.com/salvadordf/WebView4Delphi/blob/05346e895e996d3d59021bbf5409f72cc33d32be/source/uWVBrowserBase.pas#L2475
https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2settings8#get_isreputationcheckingrequired
SmartScreen helps webviews identify reported phishing and malware websites and also helps users make informed decisions about downloads.

public HRESULT put_IsReputationCheckingRequired(BOOL value)

IsReputationCheckingRequired is used to control whether SmartScreen enabled or not. SmartScreen is enabled or disabled for all CoreWebView2s using the same user data folder. If CoreWebView2Setting.IsReputationCheckingRequired is true for any CoreWebView2 using the same user data folder, then SmartScreen is enabled. If CoreWebView2Setting.IsReputationCheckingRequired is false for all CoreWebView2 using the same user data folder, then SmartScreen is disabled. When it is changed, the change will be applied to all WebViews using the same user data folder on the next navigation or download. The default value for IsReputationCheckingRequired is true. If the newly created CoreWebview2 does not set SmartScreen to false, when navigating(Such as Navigate(), LoadDataUrl(), ExecuteScript(), etc.), the default value will be applied to all CoreWebview2 using the same user data folder. SmartScreen of WebView2 apps can be controlled by Windows system setting "SmartScreen for Microsoft Edge", specially, for WebView2 in Windows Store apps, SmartScreen is controlled by another Windows system setting "SmartScreen for Microsoft Store apps". When the Windows setting is enabled, the SmartScreen operates under the control of the IsReputationCheckingRequired. When the Windows setting is disabled, the SmartScreen will be disabled regardless of the IsReputationCheckingRequired value set in WebView2 apps. In other words, under this circumstance the value of IsReputationCheckingRequired will be saved but overridden by system setting. Upon re-enabling the Windows setting, the CoreWebview2 will reference the IsReputationCheckingRequired to determine the SmartScreen status.
Post Reply