Skip to content
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

Add paramArray support to Javascript Binding #1644

Merged
merged 2 commits into from
Apr 5, 2016

Conversation

ChrisBardsley
Copy link
Contributor

This fix allow you to use a params array for a parameter in your C# object that is bound to your javascript functions.

@@ -351,6 +351,14 @@ <h3 id="features-javascript-integration">JavaScript integration</h3>
objects.
</p>
<h3>Hooks by which you can modify and/or override certain features of the web browsing</h3>
<p>
A fix to allow params to be used by the .NET methods called by the javascript<br />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in BindingTest.html. Also having A fix to allow params to be used by the .NET methods called by the javascript is not really relevant to someone using CefSharp. Simple description of what your demoing would be better 👍

@amaitland
Copy link
Member

@ChrisBardsley Welcome, and thanks for the contribution 😄 Comments inline, by all means ask any questions for clarification.

I'd also like to rename this to something simple like Add paramArray support to Javascript binding, for a few reasons

  • Fix implies it was supported and didn't work, it just plain wasn't supported
  • I believe at least VB.Net has support for params, so C# is a little too specific here.

@amaitland amaitland added this to the 49.0.0 milestone Mar 28, 2016
@amaitland amaitland changed the title Fix for C# paramArray and refactor on arguments mismatch Add paramArray support to Javascript Binding Mar 30, 2016
@amaitland
Copy link
Member

@ChrisBardsley Any further comment on this? Initially I was planning on this being in the 49.0.0 release, as it stands it'll be bumped to 51

@amaitland amaitland merged commit 7cf5f17 into cefsharp:master Apr 5, 2016
@amaitland
Copy link
Member

@ChrisBardsley Merged with changes, see 669404f (comments welcome)

I'll review one more time in the next few days before merging into the cefsharp/49 branch.

Thanks for the contribution 👍

@ray007
Copy link

ray007 commented Apr 28, 2016

There seems to be a problem with managing missing/optional parameters.
in JavascriptObjectRepository.cs line 123 my null-Parameter from javascript gets matched in replaced by a MissingParameter.

@amaitland
Copy link
Member

@ray007 Please open a new issue. Ideally submitting a PR with a proposed solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants