-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RegisterAsyncJsObject managed methods can now return arrays of structs #1981
RegisterAsyncJsObject managed methods can now return arrays of structs #1981
Conversation
A technical description please This |
CefSharp.Example/AsyncBoundObject.cs
Outdated
@@ -33,5 +37,12 @@ public void DoSomething() | |||
{ | |||
Thread.Sleep(1000); | |||
} | |||
|
|||
public JsObject[] ObjectArray(string name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting please, braces on `new lines, be consistent with other
CefSharp.Example/AsyncBoundObject.cs
Outdated
@@ -8,6 +8,10 @@ | |||
|
|||
namespace CefSharp.Example | |||
{ | |||
public struct JsObject { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brace on new line please
@@ -82,11 +82,21 @@ | |||
writeAsyncResult(call, end); | |||
}); | |||
} | |||
|
|||
function asyncObjectArray() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Braces on new lines
|
||
asyncError(); | ||
asyncDivOk(); | ||
asyncDivFail(); | ||
asyncDoSomething(); | ||
asyncHello(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an asyncHello
method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
Problem:
It was not possible to call .Net methods from JS that return arrays of structs.
Fix:
IsComplexType from JavascriptObjectRepository returns false for arrays.
Notes:
This PR requires 1979