-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[feat] Expose the ability to enable are_browser_extensions_enabled
from CoreWebView2EnvironmentOptions
#10909
Comments
wry (#1344) needs a PR in tauri to be exposed and the author said they will open one.
We wouldn't want that, now would we? you could just open a PR 😉 (ofc if you want) and I will help land this in wry and tauri. |
Hahaha fair enough, I will take a crack at the Wry portion sometime very soon! |
What would be the most sensible way to include platform specific options (like this or the scrollbar style thing) in Tauri? My heart tells me adding something like let win = WebviewWindowBuilder::new(x, y, z)
.windows_browser_extensions_enabled(true); is kinda ugly but I can't really think of anything else off the top of my head |
this is fine but I would just name it |
Okay! The Wry PR is done (tauri-apps/wry#1356) so once that's in I'll get the Tauri PR going 💪 |
Tauri PR opened! #11056 |
I tried to find this in the API of v2.0.6 but wasn't able to. Is it available yet? |
Yep, it's named |
Describe the problem
While I understand this would have to be Windows-only from the get-go (and a somewhat niche use-case), I'd like to not only load a custom extension (for use in overwriting request headers, something that can otherwise not be done in Tauri/Wry using external URLs), but also give my users the ability to load browser extensions as well.
To do so requires setting
CoreWebView2EnvironmentOptions.set_are_browser_extensions_enabled(true)
as well as callingAddBrowserExtension
on theICoreWebview2Profile7
. While I can access theICoreWebView2Profile7
and call that function (viaWebviewWindow.with_webview
and some casting), after some digging, I couldn't find a way to set this environment option to begin with.Describe the solution you'd like
I haven't totally thought of the best way to go about this honestly, since it's as platform-specific as you can get, and I don't have a perfect understanding of the Wry & Tauri codebases.
I recently looked at this Wry PR (#1344) that implemented the ability to change the scrollbar style for Windows in Wry, but as far as I'm aware, this functionality isn't exposed in Tauri either, so I wouldn't know what the plan is/would be to do so (if there even is any). Assuming that does get exposed, the same methodology would probably apply to this as well.
Alternatives considered
Like most problems, I could probably solve it by just forking and maintaining a separate Wry and Tauri, but that sounds like a huge pain lol.
Additional context
No response
The text was updated successfully, but these errors were encountered: