Skip to content

Commit 015d865

Browse files
committed
OffScreen - Clarify BrowserInitialized may not be called if Browser created automatically
Resolves #3552
1 parent 2e87516 commit 015d865

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CefSharp.OffScreen/ChromiumWebBrowser.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ public bool IsBrowserInitialized
162162
/// <summary>
163163
/// Create a new OffScreen Chromium Browser. If you use <see cref="CefSharp.JavascriptBinding.JavascriptBindingSettings.LegacyBindingEnabled"/> = true then you must
164164
/// set <paramref name="automaticallyCreateBrowser"/> to false and call <see cref="CreateBrowser"/> after the objects are registered.
165+
/// The underlying Chromium Embedded Framework(CEF) Browser is created asynchronouly, to subscribe to the <see cref="BrowserInitialized"/> event it is recommended
166+
/// that you set <paramref name="automaticallyCreateBrowser"/> to false, subscribe to the event and then call <see cref="CreateBrowser(IWindowInfo, IBrowserSettings)"/>
167+
/// to ensure you are subscribe to the event before it's fired (Issue https://github.com/cefsharp/CefSharp/issues/3552).
165168
/// </summary>
166169
/// <param name="html">html string to be initially loaded in the browser.</param>
167170
/// <param name="browserSettings">The browser settings to use. If null, the default settings are used.</param>
@@ -176,6 +179,9 @@ public ChromiumWebBrowser(HtmlString html, IBrowserSettings browserSettings = nu
176179
/// <summary>
177180
/// Create a new OffScreen Chromium Browser. If you use <see cref="CefSharp.JavascriptBinding.JavascriptBindingSettings.LegacyBindingEnabled"/> = true then you must
178181
/// set <paramref name="automaticallyCreateBrowser"/> to false and call <see cref="CreateBrowser"/> after the objects are registered.
182+
/// The underlying Chromium Embedded Framework(CEF) Browser is created asynchronouly, to subscribe to the <see cref="BrowserInitialized"/> event it is recommended
183+
/// that you set <paramref name="automaticallyCreateBrowser"/> to false, subscribe to the event and then call <see cref="CreateBrowser(IWindowInfo, IBrowserSettings)"/>
184+
/// to ensure you are subscribe to the event before it's fired (Issue https://github.com/cefsharp/CefSharp/issues/3552).
179185
/// </summary>
180186
/// <param name="address">Initial address (url) to load</param>
181187
/// <param name="browserSettings">The browser settings to use. If null, the default settings are used.</param>

0 commit comments

Comments
 (0)