-
-
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
Added parameter for lowercasing JS functions (or not) #923
Conversation
This is the suggested fix for #922 |
@@ -661,9 +661,9 @@ namespace CefSharp | |||
} | |||
} | |||
|
|||
void RegisterJsObject(String^ name, Object^ object) | |||
void RegisterJsObject(String^ name, Object^ object, bool lowerCaseJavascriptNames) |
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.
Spaces not tabs see https://github.com/cefsharp/CefSharp/blob/master/CONTRIBUTING.md#coding-style
Comments inline, needs a bit of refactoring and cleanup. Nothing major though. |
Thinking about this a little more, might be worth just using an Also I think |
Shall I change my pull request to fulfill the coding guidelines etc, or would you suggest to implement the alternative solution using optional parameters? |
I think optional params makes sense. What do you think? |
I do not know the internals of the project well enough to really be sure, but I also think that an optional parameter makes sense. |
It's only the external methods that require optional params, specifically those on the The |
…am wasn't being propagated recursively. Default TryCallMethod to using LowercaseFirst
…uces code duplication
…ming Cleanup JSB Lowercase Name
Added parameter for lowercasing JS functions (or not)
Coming in a bit late here, but just a suggestion: |
(just so we keep the public API clean) |
Hadn't really though about it 😄 As it applies to both properties as well, it should probably have a more generic name. I'm all for improving variable naming as a general thing 👍 @perlun Do you have time to submit a |
(Or even just apply the changes directly to |
That means that you go under the assumption, that all js functions are per se lowercase (so |
Technically it's probably |
Sounds good. |
Used to give the dev the possibility to decide wether JS methods/objects/parameters should be automatically made first letter lowercase or not.