You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
component: WebView | priority: normal | keywords: wxWebViewEdge
2021-11-11 12:03:38: rk (Ronny Krueger) created the issue
WebView2 allows to specify a user data folder where the component will "store browser data, such as cookies, permissions, and cached resources" (see here for more details).
The folder that the backend currently uses is hard-coded to wxStandardPaths::Get().GetUserLocalDataDir(). I see a couple of problems with that:
There is only one folder per application which means that all data is shared between application instances. This is a good default but might be a problem with advanced use cases.
According to the documentation (see above link) the application is responsible for this folder. But right now it is not possible to get this path without looking into the source code. Also, the used path is the user's local data directory itself (not a sub directory inside of it). This makes it quite hard if you want to delete the WebView2 data without accidentally deleting any other data that could have been put there.
I think the easiest way to fix this would be extending wxWebViewEdge with MSWSetUserDataDir() and MSWGetUserDataDir() methods that allow to specify and query the user data path from the application code.
One problem I see is that technically WebView2 allows to specify a different user data path for each instance. If wx wants to support this it would mean that this path cannot simply be a static variable in the backend but must be passed to and saved inside the wxWebViewEdge instance.
The text was updated successfully, but these errors were encountered:
TcT2k
added a commit
to TcT2k/wxWidgets
that referenced
this issue
Mar 17, 2023
Issue migrated from trac ticket # 19317
component: WebView | priority: normal | keywords: wxWebViewEdge
2021-11-11 12:03:38: rk (Ronny Krueger) created the issue
WebView2 allows to specify a user data folder where the component will "store browser data, such as cookies, permissions, and cached resources" (see here for more details).
The folder that the backend currently uses is hard-coded to
wxStandardPaths::Get().GetUserLocalDataDir()
. I see a couple of problems with that:I think the easiest way to fix this would be extending
wxWebViewEdge
withMSWSetUserDataDir()
andMSWGetUserDataDir()
methods that allow to specify and query the user data path from the application code.One problem I see is that technically WebView2 allows to specify a different user data path for each instance. If wx wants to support this it would mean that this path cannot simply be a static variable in the backend but must be passed to and saved inside the
wxWebViewEdge
instance.The text was updated successfully, but these errors were encountered: