-
Hey, I am new to this, and I want to know more about the CreateBrowserAsync of CefSharp.OffScreen. I am doing a project which do not uses any UI. So, I want to know whether to use the CreateBrowserAsync or just CreateBrowser. I want to know more about this CreateBrowserAsync when it is used and when not. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Anything? @amaitland ? |
Beta Was this translation helpful? Give feedback.
-
The browser is always created By default I often don't worry about browser creation and just page load There are some examples at https://github.com/cefsharp/CefSharp.MinimalExample/blob/master/CefSharp.MinimalExample.OffScreen/Program.cs which are worth looking at. The If you are creating a new project then https://github.com/hardkoded/puppeteer-sharp maybe a better alternative. |
Beta Was this translation helpful? Give feedback.
-
Hey @amaitland, got one more question I hope you can help me with that this is related but kind of not related to CEFSharp. |
Beta Was this translation helpful? Give feedback.
The browser is always created
async
in reality,CreateBrowserAsync
will wait for the browser to be initialized where asCreateBrowser
will return immediately, and you need to use another means of waiting for the browser to load, e.g. differentasync
call.By default
CreateBrowser
will be called internally when you instantiate aChromiumWebBrowser
instance (unless you specify otherwise). This is a design mistake that I wish I could take back.I often don't worry about browser creation and just page load
There are some examples at h…