Dev Tools empty when I open them too soon

Having problems with building or using the JCEF Java binding? Ask your questions here.

Dev Tools empty when I open them too soon

Postby dtanzer » Tue Jul 02, 2019 11:50 pm

When I open the dev tools right after creating a browser, they are just empty (white). When I add Thread.sleep(1000) before opening the dev tools, it works fine.
Is there any event or listener or handler I could register that tells me when the browser is ready? The "Thread.sleep" is not a good solution, I guess...
dtanzer
Newbie
 
Posts: 9
Joined: Thu Jun 06, 2019 2:33 pm

Re: Dev Tools empty when I open them too soon

Postby Czarek » Wed Jul 03, 2019 1:30 am

See CefLifeSpanHandler::OnAfterCreated and CefRenderProcessHandler::OnBrowserCreated. When you call CreateBrowser it executes asynchronously.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 17 guests