Closed jonjbar closed 1 year ago
It's not recommended to lock the user interface while you wait for a browser event.
I would suggest that you use asynchronous browser methods or wait until Microsoft adds support for an off-screen rendering mode to WebView2 to capture a snapshot synchronously.
If your application depends on a synchronous method to capture snapshots and you need to implement it right now then consider using CEF4Delphi because it already supports the off-screen rendering mode.
Would you consider a synchronous capture method (as well as a synchronous script execution too) ? This could be done by introducing a TEvent and a timeout in a method which could be named TWVBrowserBase.CapturePreviewSync. Let me know if you need some code to illustrate this request.