Skip to content

Commit 6ba6b7a

Browse files
committed
JSB - Improve xmldoc for IJavascriptObjectRepository
1 parent fa30670 commit 6ba6b7a

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

CefSharp/IJavascriptObjectRepository.cs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
44

55
using System;
6-
76
using CefSharp.Event;
8-
using CefSharp.ModelBinding;
97

108
namespace CefSharp
119
{
@@ -16,19 +14,25 @@ namespace CefSharp
1614
public interface IJavascriptObjectRepository : IDisposable
1715
{
1816
/// <summary>
19-
/// Register a javascript object
17+
/// Register an object for binding in Javascript. You can either
18+
/// register an object in advance or as part of the <see cref="ResolveObject"/>
19+
/// event that will be called if no object matching object is found in the registry.
20+
/// Objects binding is now initiated in Javascript through the CefSharp.BindObjectAsync
21+
/// function (returns a Promose).
22+
/// For more detailed examples see https://github.com/cefsharp/CefSharp/issues/2246
2023
/// The equivilient to RegisterJsObject is isAsync = false
2124
/// The equivilient RegisterAsyncJsObject is isAsync = true
2225
/// </summary>
23-
/// <param name="name">name</param>
24-
/// <param name="objectToBind">object</param>
26+
/// <param name="name">object name</param>
27+
/// <param name="objectToBind">the object that will be bound in javascript</param>
2528
/// <param name="isAsync">
2629
/// if true the object will be registered for async communication,
2730
/// only methods will be exposed and when called from javascript will return a Promise to be awaited.
2831
/// This method is newer and recommended for everyone starting out as it is faster and more reliable.
2932
/// If false then methods and properties will be registered, this method relies on a WCF service to communicate.
3033
/// </param>
31-
/// <param name="options">binding options</param>
34+
/// <param name="options">binding options, by default method/property names are camelCased, you can control this
35+
/// and other advanced options though this class.</param>
3236
void Register(string name, object objectToBind, bool isAsync = false, BindingOptions options = null);
3337
/// <summary>
3438
/// Has bound objects
@@ -40,13 +44,12 @@ public interface IJavascriptObjectRepository : IDisposable
4044
/// <param name="name">name</param>
4145
/// <returns>true if object with matching name bound</returns>
4246
bool IsBound(string name);
43-
4447
/// <summary>
4548
/// Event handler is called when an object with a given name is requested for binding and is not yet
46-
/// registered with the repository
49+
/// registered with the repository. Use <see cref="JavascriptBindingEventArgs.ObjectRepository"/>
50+
/// to register objects (using
4751
/// </summary>
4852
event EventHandler<JavascriptBindingEventArgs> ResolveObject;
49-
5053
/// <summary>
5154
/// Event handler is triggered when a object has been successfully bound on javascript
5255
/// </summary>

CefSharp/IWebBrowser.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
44

55
using System;
6-
using CefSharp.ModelBinding;
76

87
namespace CefSharp
98
{
@@ -99,6 +98,9 @@ public interface IWebBrowser : IDisposable
9998
/// object will be a standard javascript Promise object which is usable to wait for completion or failure.</remarks>
10099
void RegisterAsyncJsObject(string name, object objectToBind, BindingOptions options = null);
101100

101+
/// <summary>
102+
/// The javascript object repository, one repository per ChromiumWebBrowser instance.
103+
/// </summary>
102104
IJavascriptObjectRepository JavascriptObjectRepository { get; }
103105

104106
/// <summary>

0 commit comments

Comments
 (0)