如何从VSCODE API打开浏览器,在收到响应后将其关闭,然后返回VSCODE应用程序

发布于 2025-01-24 15:51:48 字数 413 浏览 5 评论 0原文

我正在开发Vscode中的插件,这是我想

  1. 从插件中弄清楚的内容,用URL打开浏览器,进行登录并在Vscode插件中获取响应,然后关闭浏览器。

我可以通过使用

  1. vscode.window.createwebviewpanel来做到这一点 - 这将需要在VSCODE插件端进行大量重复代码。

或可以在以下尝试

  1. 使用open lib npm - 打开浏览器,但挑战是我不是确保如何关闭浏览器并将响应发送到VSOCODE插件。在VS代码中是否有可能?

I am developing a plugin in VSCODE and here is what I am trying to figure out

  1. From within plugin, open the browser with a url, do a sign in and get the response in vscode plugin and then close the browser.

I could do this by using

  1. vscode.window.createWebviewPanel - This will need a lot of duplicate code to be done on vscode plugin side.

OR could try below

  1. Use open lib npm - open the browser, but the challenge is I am not sure on how to close the browser and send response to VSOCODE plugin. Is it even possible in vs code ?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文