Skip to content

Commit fa7dd2a

Browse files
authored
Update ExecuteScriptWithResult.md
1 parent 0837d84 commit fa7dd2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

specs/ExecuteScriptWithResult.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ void MatchRegWithScript(wil::com_ptr<ICoreWebView2> webView
4949
, LPCWSTR reg
5050
, LPCWSTR item)
5151
{
52-
wil::com_ptr<ICoreWebView2_10> webview2 = webView.try_query<ICoreWebView2_10>();
53-
5452
if (!webview2)
5553
{
5654
// ExecuteScriptWithResult is not supported by this WebView.
5755
return;
5856
}
5957

58+
wil::com_ptr<ICoreWebView2_10> webview2 = webView.try_query<ICoreWebView2_10>();
59+
6060
auto scriptCode = GenerateScriptCode(str, reg, item);
6161
webview2->ExecuteScriptWithResult(
6262
scriptCode.c_str(),

0 commit comments

Comments
 (0)