A DESCRIPTION OF THE PROBLEM :
Feature Request:
A way to define a user data directory for __all__ WebEngines of an application, including those that are not directly under control in our base.
Use Case:
We have multiple Fx apps for our users. Our users complain about the placement of the WebEngine user data directories for the different apps placed directly in their user directory (e.g. on Linux: $HOME/.helloworld.HelloAnimation/ ). They would prefer it if they would all be placed in e.g. $HOME/.cache/.helloworld.HelloAnimation/ .
We can set WebEngine#setUserDataDirectory for WebViews/WebEngines that we directly control in our code. However, if we want to do it for __all__ WebViews/WebEngines (including future ones), it becomes a bit more cumbersome - instead of using e.g. new WebView(), we would have do use some kind of factory method that configures the WebView's engine. However, for WebViews/WebEngines created by third-party code (or even JavaFX itself - see HTMLEditorSkin), we obviously cannot enforce the user of our factory method. As soon as any one WebEngine uses the default user data directory, the undesired directories will be created again.
This is where a way to define an application-wide WebEngine user data (base) directory would be useful.
Known Workarounds:
None we know of that reliably work for __all__ WebEngines in an application (including those from JavaFX skins, third-party libraries, etc. which can be added to the Scene Graph at any time).
Feature Request:
A way to define a user data directory for __all__ WebEngines of an application, including those that are not directly under control in our base.
Use Case:
We have multiple Fx apps for our users. Our users complain about the placement of the WebEngine user data directories for the different apps placed directly in their user directory (e.g. on Linux: $HOME/.helloworld.HelloAnimation/ ). They would prefer it if they would all be placed in e.g. $HOME/.cache/.helloworld.HelloAnimation/ .
We can set WebEngine#setUserDataDirectory for WebViews/WebEngines that we directly control in our code. However, if we want to do it for __all__ WebViews/WebEngines (including future ones), it becomes a bit more cumbersome - instead of using e.g. new WebView(), we would have do use some kind of factory method that configures the WebView's engine. However, for WebViews/WebEngines created by third-party code (or even JavaFX itself - see HTMLEditorSkin), we obviously cannot enforce the user of our factory method. As soon as any one WebEngine uses the default user data directory, the undesired directories will be created again.
This is where a way to define an application-wide WebEngine user data (base) directory would be useful.
Known Workarounds:
None we know of that reliably work for __all__ WebEngines in an application (including those from JavaFX skins, third-party libraries, etc. which can be added to the Scene Graph at any time).