Skip to content

Commit add1eeb

Browse files
Added function showing how we could see if task manager is available
1 parent 131952a commit add1eeb

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

specs/BrowserTaskManager.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,18 @@ wil::com_ptr<ICoreWebView2> m_webview;
3030
// [Script -> Open Task Manager Window].
3131
void ScriptComponent::OpenTaskManagerWindow()
3232
{
33-
// Assume OpenTaskManagerWindow is available if we support ICoreWebView2_5.
3433
auto webview5 = m_webview.try_query<ICoreWebView2_5>();
3534
if (webview5)
3635
{
3736
CHECK_FAILURE(webview5->OpenTaskManagerWindow());
3837
}
3938
}
39+
40+
// Assume OpenTaskManagerWindow is available if the WebView supports ICoreWebView2_5.
41+
bool ScriptComponent::ShouldShowOpenTaskManagerWindowMenuItem()
42+
{
43+
return m_webview.try_query<ICoreWebView2_5>();
44+
}
4045
```
4146

4247
## C#: Open Task Manager

0 commit comments

Comments
 (0)