New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Windows.UI.Xaml.Controls.WebView where possible on Windows #85
Comments
i'm working on this right now. also, this would sort-of solve #76. |
Also, it might add HDPI support as well |
Hmm... I made a rip-off of this library at quadrupleslap/tether, and it uses the UWP control, but there's a few problems:
|
@quadrupleslap |
Could this be ported back to webview? |
Could we use Microsoft/cppwinrt once Windows 10 RS4 is out so we don't have to mess with the AppManifest stuff? If I understand correctly it would also enable Edge webview to work on older versions of Windows as well, however would need to be compiled on Windows 10 RS4+ |
@jmerriweather NIce find. They sound like this is the one true API going forward, but the repo has not had any commits for 4 ot 5 months. I dont get it. is Windows 10 RS4+ available ? I have to admit i am lost with all their flux. |
Is this possible to support GTK on Windows? Like certain library that support using GTK on both OS etc, but here we support native browser and selective like GTK. |
@jmerriweather Unfortunately (as best I can tell), that just removes the dependency on C++/CX, so I guess it could theoretically help with cross-compilation, but you still need an AppManifest and to participate the whole Microsoft sandboxing mess. @edwardchanjw I don't see why not. Do you want GTK with an Internet Explorer fallback, or the ability to use GTK instead of Internet Explorer? |
Can it be used in Android applications? |
@edwardchanjw Whoops, I forgot: if you want to use Webkit2GTK instead of Internet Explorer on Windows, you might be able to just pass -DWEBVIEW_GTK=1 instead of -DWEBVIEW_WINAPI, like you would on Linux, and link as required (kind of obvious now that I think about it). @kofredwan13 This library cannot currently be used in Android applications. |
Hi. I tried passing -DWEBVIEW_GTK=1 instead of -DWEBVIEW_WINAPI. With pacman from MSYS2 I installed gtk3, toolchain and base-devel. I got stuck because pacman does not offer a webkit2 target (anymore?) as required for webview.h. And the webkitgtk-2.22.2 I installed by hand fails due to #include errors: <webkit2/webkit2.h> does not exist in webkitgtk-2.22.2. How can I solve this? @quadrupleslap? I am no Windows expert by any stretch. But I made some really nice Linux and macOS apps with Webview and Go. I posted #191 a while back. |
I've found a repo where someone has dabbled with the new APIs that allow for some UWP features to be used within Win32 apps. Maybe this could be adapted to support EdgeHTML in webview for rust? |
I'll have a go at adding support for this to zserge/webview, but I'm not sure whether this will support Microsoft's apparent migration to Chromium. |
Thanks! I'm looking forward to it. :) Even if this doesn't support the migration to Chromium, EdgeHTML is still a huge upgrade from IE11 in both performance and web standards compatibility. |
Okay, just waiting for Windows' October 2018 Update (1809) to be rolled out so that I can use |
The October 2018 update has been out for a while now... https://m.windowscentral.com/microsoft-begins-re-rollout-windows-10-october-2018-update Or do you mean you're waiting for it to be wide-spread? |
Somehow I managed to make a minimal HWND + embedded Edge browser with pure C++17 using WinRT APIs. Unfortunately, I had to compile it with Anyway, this means webview.h is about to be rewritten using a subset of modern C++ (we need C++17 anyway to support Edge and WinRT, so why not to simplify code for other platforms as well?). The high-level API will remain suitable for C and Go. |
I have a fork working with a slightly different API and multiple windows, but I split everything into separate files, so the macOS part is in Objective C, and the Windows part is in C++/WinRT. I still can't get the Windows version working though, because Microsoft won't offer my PC the October Update. I can put it on GitHub if anyone wants it. |
Have you tried using the "Update now" button on this page? https://www.microsoft.com/en-au/software-download/windows10 |
For those working on this, here's a same-licensed project/code that uses the Edge control: https://github.com/patr0nus/DeskGap/blob/5992a2eaf7c1695eba60a79553d3cf9ea6d1fecd/core/src/win/webview.cpp |
There is an experimental branch, |
Hi, sorry to bump this one, |
Am also curious to the status of webview-x. No commits for 4 months. Is it still active? |
In addition to the Xaml control (which may use it underneath I dunno), there is https://docs.microsoft.com/en-us/microsoft-edge/hosting/webview2 |
The WebView2 is way better, it's your regular good old Chrome renderer. Also they seem to be updating the sample rather regularily: https://github.com/MicrosoftEdge/WebView2Samples/tree/master/WebView2APISample XAML component might not be updated to that for a while. Hard to imagine building on MSHTML (Old Edge) these days. |
@Ciantic Both are implemented in the webview-x branch, with a fallback from WebView2 (Edge/Chromium) to EdgeHTML, while MSHTML implementation is removed. |
Will the webview-x branch be merged to master or is it just an experiment? |
Yes, it would be nice to merge webview-x because downstream stuff is not even aware of webview-x branch. At least we could get the support to trickle faster. |
There are plenty of serious reasons to prefer EdgeHTML to MSHTML; Edge is a more modern target than IE, with various features that you can’t get on IE.
In Universal Windows Apps, Windows.UI.Xaml.Controls.WebView uses IE11 on Windows 8 and Edge on Windows 10.
I don’t know how you would go about doing it and I’m not certain it’s possible to do both in the one binary (though I imagine it is), but the ideal situation is to try to use the UWP WebView where possible, before falling back to the old MSHTML.
I expect this would require using some C++/CX.
I expect that implementing this will involve quite a bit of research and development, but it should be possible and is very desirable.
The text was updated successfully, but these errors were encountered: