Incus J 10 Posted 20 hours ago I have VCL TWebBrowser working in “EdgeOnly” mode (SelectedEngine) in a simple test app. It’s loading pages and I can browse sites. So far so good. I’d like to execute some Javascript and obtain a result. I’m happy to stick with TWebBrowser if it’s possible. Must be in EdgeOnly mode though! On the other hand, TEdgeBrowser has built in Javascript execution. So maybe I should switch to that component - except I can’t get it to work. When I run my test app, TWebBrowser loads OK, but TEdgebrowser remains a grey empty background and ignores all commands to Navigate etc. - I suspect it isn’t initialising. No error messages. WebView2Loader.dll is present in the app folder - and TWebBrowser is using it successfully. Given that TWebBrowser is working in EdgeOnly mode, what am I missing with TEdgeBrowser? Delphi 12.3 on Windows 11 (Arm, 24H2 64-bit). Share this post Link to post
Der schöne Günther 336 Posted 20 hours ago 4 minutes ago, Incus J said: No error messages. The TEdgeBrowser has an event handler to catch initialization (OnCreateWebViewCompleted and OnProcessFailed). Have you checked those? Share this post Link to post
Incus J 10 Posted 20 hours ago Yes, I have an event handler assigned to each of those events - just to log any activity to a TMemo. Neither event is triggered. Share this post Link to post
Der schöne Günther 336 Posted 4 hours ago I am using TEdgeBrowser excessively, up to the point of completely replacing a VCL-based UI with a web-based interface, as well as injecting and calling JavaScript at runtime. Can you provide a minimal example of your project? One caveat is that you have to wait for the TEdgeBrowser to finish navigation and _then_ do something with its content, but I suppose that is the same when being wrapped by TWebBrowser. Share this post Link to post