Skip to content

About CreateBrowserAsync in CefSharp.OffScreen #5054

Answered by amaitland
DRV2539 asked this question in Q&A
Discussion options

You must be logged in to vote

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.

The browser is always created async in reality, CreateBrowserAsync will wait for the browser to be initialized where as CreateBrowser will return immediately, and you need to use another means of waiting for the browser to load, e.g. different async call.

By default CreateBrowser will be called internally when you instantiate a ChromiumWebBrowser 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…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by DRV2539
Comment options

You must be logged in to vote
1 reply
@amaitland
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants