Skip to content

Commit 62eaa32

Browse files
committed
Address comments
1 parent b4c7ab8 commit 62eaa32

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

specs/IsPinchZoomEnabled.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ When this setting is set to `false`, it disables the ability of the end users to
2121
wil::com_ptr<ICoreWebView2> webView;
2222
void SettingsComponent::TogglePinchZooomEnabled()
2323
{
24-
wil::com_ptr<ICoreWebView2Settings> coreWebView2Settings;
2524
// Get webView's current settings
25+
wil::com_ptr<ICoreWebView2Settings> coreWebView2Settings;
2626
CHECK_FAILURE(webView->get_Settings(&coreWebView2Settings));
27+
wil::com_ptr<ICoreWebView2Settings4> coreWebView2Settings4;
28+
coreWebView2Settings4 = coreWebView2Settings.try_query<ICoreWebView2Settings4>();
2729

2830
BOOL enabled;
29-
CHECK_FAILURE(coreWebView2Settings->get_IsPinchZoomEnabled(&enabled));
30-
CHECK_FAILURE(coreWebView2Settings->put_IsPinchZoomEnabled(enabled ? FALSE : TRUE));
31+
CHECK_FAILURE(coreWebView2Settings4->get_IsPinchZoomEnabled(&enabled));
32+
CHECK_FAILURE(coreWebView2Settings4->put_IsPinchZoomEnabled(enabled ? FALSE : TRUE));
3133
}
3234
```
3335

@@ -52,7 +54,7 @@ See [API Details](#api-details) section below for API reference.
5254
## Win32 C++
5355
```cpp
5456
[uuid(B625A89E-368F-43F5-BCBA-39AA6234CCF8), object, pointer_default(unique)]
55-
interface ICoreWebView2StagingSettings : IUnknown {
57+
interface ICoreWebView2Settings4 : ICoreWebView2Settings3 {
5658
/// The IsPinchZoomEnabled property enables or disables the ability of
5759
/// the end user to use a pinching motion on touch input enabled devices
5860
/// to scale the web content in the WebView2. It defaults to TRUE.

0 commit comments

Comments
 (0)