This is a proof of concept for embedding Webview2 into Go without CGo. It is based on webview/webview and provides a compatible API.
Because this version doesn't currently have an EdgeHTML fallback, it will not work unless you have a Webview2 runtime installed. In addition, it requires the Webview2Loader DLL in order to function. Adding an EdgeHTML fallback should be technically possible but will likely require much worse hacks since the API is not strictly COM to my knowledge.
For now, you'll need to install the Webview2 runtime, as it does not ship with Windows.
After that, you should be able to run go-webview2 directly:
go run github.com/jchv/go-webview2/cmd/demo
This will use go-winloader to load an embedded copy of WebView2Loader.dll.
If this does not work, please try running from a directory that has an appropriate copy of WebView2Loader.dll
for your GOARCH. If that worked, please file a bug so we can figure out what's wrong with go-winloader :)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。