【问题标题】:Is it possible for a Blazor WebAssembly PWA to run a local desktop app on the user's file system?Blazor WebAssembly PWA 是否可以在用户的​​文件系统上运行本地桌面应用程序?
【发布时间】:2023-03-19 07:15:01
【问题描述】:

我真的对此表示怀疑,但我认为问它永远不会有坏处……我想做的是创建一个能够从网络应用程序中启动实际游戏的游戏配对网站。如果没有,我想我可以创建一个客户端/服务器桌面应用程序或其他东西......

【问题讨论】:

    标签: progressive-web-apps blazor webassembly


    【解决方案1】:

    不,PWA 沙盒禁止它。

    您可以尝试构建一个运行 Blazor WASM 的 Electron 应用 - https://github.com/aspnet/AspLabs/tree/master/src/ComponentsElectron

    或者你可以试试下面的链接。它做了类似的事情,但不捆绑浏览器以减小大小 - https://github.com/steveSandersonMS/BlazorDesktop

    史蒂夫·桑德森(Steve Sanderson)为此写了一篇内容丰富的博客 https://blog.stevensanderson.com/2019/11/01/exploring-lighter-alternatives-to-electron-for-hosting-a-blazor-desktop-app/

    【讨论】:

    • 嗯,@Peter-Morris 是否可以使用链接启动应用程序?与 Github 对桌面版本的处理方式相同:例如<a href="x-github-client://openRepo/https://github.com/repopathhere"> ?显然,该应用需要注册,浏览器会提示确认操作。
    • 如果它在浏览器中工作,那么它应该工作。确保使用 NavigationManager 以 true 作为 forceLoad 参数执行导航
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-12-19
    • 2011-06-19
    • 2019-11-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-10
    相关资源
    最近更新 更多