Skip to content

Commit 2568236

Browse files
committed
OffScreen - Clarify BrowserInitialized may not be called if Browser created automatically
Resolves #3552
1 parent 6daa57d commit 2568236

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CefSharp.OffScreen/ChromiumWebBrowser.cs

+6
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ public bool IsBrowserInitialized
151151
/// <summary>
152152
/// Create a new OffScreen Chromium Browser. If you use <see cref="CefSharp.JavascriptBinding.JavascriptBindingSettings.LegacyBindingEnabled"/> = true then you must
153153
/// set <paramref name="automaticallyCreateBrowser"/> to false and call <see cref="CreateBrowser"/> after the objects are registered.
154+
/// The underlying Chromium Embedded Framework(CEF) Browser is created asynchronouly, to subscribe to the <see cref="BrowserInitialized"/> event it is recommended
155+
/// that you set <paramref name="automaticallyCreateBrowser"/> to false, subscribe to the event and then call <see cref="CreateBrowser(IWindowInfo, IBrowserSettings)"/>
156+
/// to ensure you are subscribe to the event before it's fired (Issue https://github.com/cefsharp/CefSharp/issues/3552).
154157
/// </summary>
155158
/// <param name="html">html string to be initially loaded in the browser.</param>
156159
/// <param name="browserSettings">The browser settings to use. If null, the default settings are used.</param>
@@ -165,6 +168,9 @@ public ChromiumWebBrowser(HtmlString html, IBrowserSettings browserSettings = nu
165168
/// <summary>
166169
/// Create a new OffScreen Chromium Browser. If you use <see cref="CefSharp.JavascriptBinding.JavascriptBindingSettings.LegacyBindingEnabled"/> = true then you must
167170
/// set <paramref name="automaticallyCreateBrowser"/> to false and call <see cref="CreateBrowser"/> after the objects are registered.
171+
/// The underlying Chromium Embedded Framework(CEF) Browser is created asynchronouly, to subscribe to the <see cref="BrowserInitialized"/> event it is recommended
172+
/// that you set <paramref name="automaticallyCreateBrowser"/> to false, subscribe to the event and then call <see cref="CreateBrowser(IWindowInfo, IBrowserSettings)"/>
173+
/// to ensure you are subscribe to the event before it's fired (Issue https://github.com/cefsharp/CefSharp/issues/3552).
168174
/// </summary>
169175
/// <param name="address">Initial address (url) to load</param>
170176
/// <param name="browserSettings">The browser settings to use. If null, the default settings are used.</param>

0 commit comments

Comments
 (0)