How to install extensions in WebView2 prerelease v1.0.2065? #4061
Replies: 5 comments
-
I'm able to install extensions. First, you must set CoreWebView2EnvironmentOptions.AreBrowserExtensionsEnabled to true. Then, call CoreWebView2.Profile.AddBrowserExtensionAsync("folder containing manifest.json"). |
Beta Was this translation helpful? Give feedback.
-
Thank you very much. I use the control via the designer. I have some difficulties to set the options of the control. did you initialize the control via code, or via the designer? |
Beta Was this translation helpful? Give feedback.
-
via code, like this:
|
Beta Was this translation helpful? Give feedback.
-
Yes this looks like my code.
The problem is that I just dragged and dropped the control onto the form and did not initialize it via code. It must be possible to set the options this way. If I do it as described above, I get an error message that the element has already been initialized. I have looked in the designer. I do not know where I have to insert that there, if it goes at all ^^ I mean, there it must be initialized, however, you can fit there nowhere the env ` Private Sub InitializeComponent()
Almost looks like I have to create the WebView2 element manually -.-" |
Beta Was this translation helpful? Give feedback.
-
How to do this in MAUI C#? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, currently I am trying to install an extension. I try to check if extensions are allowed, but I do not find the function.
So I tried to install the extension:
WebView2_Main.CoreWebView2.Profile.AddBrowserExtensionAsync("C:\Users\xxxx\Desktop\xxxx\chrome\xx-xxt-xxx\xxxxxx_v7.1.zip")
I also tried unzipping the zip file and specified the folder. There is a manifest.json in there.
Also I tried to get a list of all installed extensions:
MsgBox(WebView2_Main.CoreWebView2.Profile.GetBrowserExtensionsAsync.ToString)
But that didn't work either...
So how do you install an extension?
And in which path is the extension installed then?
Beta Was this translation helpful? Give feedback.
All reactions