有没有一种方法可以在不显示的情况下解决网络浏览视图?

发布于 2025-02-08 12:44:09 字数 273 浏览 2 评论 0原文

我希望触发WebViewViewProvider.resolveWebViewView(),而无需显示视图 /用户打开视图。我了解您可以使用vscode.commands.executecommand(“ myview.focus”),然后将打开视图并触发上述函数。我还尝试执行命令“ workbench.view.extension.myview”,但这似乎具有相同的操作。取而代之的是,我想激活视图,以使提供商拥有它的所有权(使用ResolveWebViewView),但是该视图仍然隐藏起来,我仍然可以向其发送消息。这可能吗?

I wish to trigger WebviewViewProvider.resolveWebviewView() without showing the view / the user opening the view. I understand that you can use vscode.commands.executeCommand("myView.focus"), which would then open the view and trigger the above function. I also tried executing the command "workbench.view.extension.myview", but that seemed to have the same action. Instead, I want to activate the view such that the provider takes ownership of it (using resolveWebviewView), but the view remains hidden and I can still send messages to it. Is this possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟─花易冷 2025-02-15 12:44:09

您必须创建另一个消息处理程序。

We have a silentMessage handler

You got to create a different message handler.

We have a silentMessage handler.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文