If you want to show a popup form but you don't need to access it from javascript then you can create the child form and its browser when the global context is initialized. You would only have to return TRUE in the onbeforepopup event and then open the URL in your child form.
However, if you need to access the popup form from javascript then you can't call "createbrowser" because CEF calls cef_browser_host_create_browser_sync internally with the parameters you provide in the onbeforepopup event.
The
real problem comes when you try to destroy that child form because CEF creates child "windows" in a different thread and VCL doesn't like to create and destroy "windows" in different threads.
This is the biggest problem and the cause of the bug #107 :
https://github.com/salvadordf/CEF4Delphi/issues/107
To avoid this problem we use OSR mode in popup forms because it doesn't create anything. It just updates the bitmap with the browser contents.
I'm trying to find a solution to this problem right now. I'll let you know if I find anything.
PS : I used the "window" term found in the Windows API.