Skip to content

Commit 9699083

Browse files
committed
WinForms Example - Add binder to registered objects
Required to run BindingTest.html
1 parent 60cb75c commit 9699083

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CefSharp.WinForms.Example/BrowserTabUserControl.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ public BrowserTabUserControl(Action<string, int?> openNewTab, string url, bool m
5252
browser.StatusMessage += OnBrowserStatusMessage;
5353
browser.IsBrowserInitializedChanged += OnIsBrowserInitializedChanged;
5454
browser.LoadError += OnLoadError;
55-
56-
browser.JavascriptObjectRepository.Register("bound", new BoundObject(), isAsync: false);
57-
browser.JavascriptObjectRepository.Register("boundAsync", new AsyncBoundObject(), isAsync: true);
55+
56+
browser.JavascriptObjectRepository.Register("bound", new BoundObject(), isAsync: false, options: BindingOptions.DefaultBinder);
57+
browser.JavascriptObjectRepository.Register("boundAsync", new AsyncBoundObject(), isAsync: true, options: BindingOptions.DefaultBinder);
5858

5959
//If you call CefSharp.BindObjectAsync in javascript and pass in the name of an object which is not yet
6060
//bound, then ResolveObject will be called, you can then register it
@@ -63,7 +63,7 @@ public BrowserTabUserControl(Action<string, int?> openNewTab, string url, bool m
6363
var repo = e.ObjectRepository;
6464
if (e.ObjectName == "boundAsync2")
6565
{
66-
repo.Register("boundAsync2", new AsyncBoundObject(), isAsync: true);
66+
repo.Register("boundAsync2", new AsyncBoundObject(), isAsync: true, options: BindingOptions.DefaultBinder);
6767
}
6868
};
6969

0 commit comments

Comments
 (0)