Add environment on Edge Webview#1223
Conversation
Signed-off-by: Noa Roussiere <[email protected]>
Signed-off-by: Noa Roussiere <[email protected]>
|
Thanks for this PR. I wonder if it might be a good idea to add a new constructor that allows passing in a versioned struct with options. The struct could perhaps have the same members as the existing constructor's parameters and other things such as a window title, initial size, and also backend-specific things such as a pointer directly to The way the current For example, it isn't clear to me how options for other backends would be passed in the future and who would be responsible for the memory. If we need to pass any other type of options than When it comes to the C API, I'm afraid we can't change Especially here it would help to have a versioned struct so that the function signature doesn't have to change in the future. We would have to add a new function though such as I made an attempt to improve things in PR #766 some time ago, and I sometimes take bits of code from it, but it's pretty much abandoned. The route with an options struct seems like a good path to me, at least for the C API. In the long run, the main API would ideally not be one god class called |
Allow
ICoreWebView2EnvironmentOptionsto be Passed to ConstructorWork only for Windows.
Linux or Mac didn't need this feature
Description
This pull request introduces a modification to the WebView library, allowing the
ICoreWebView2EnvironmentOptionsto be passed directly to the constructor. This enhancement provides greater flexibility in configuring WebView2 environments with custom options, such as disabling features or setting specific browser arguments.Changes
ICoreWebView2EnvironmentOptionsparameter.Implementation Details
Constructor Modification
The constructor is now capable of receiving an
ICoreWebView2EnvironmentOptionsparameter.Example Windows: