Reformat inline js (use @ notation so much of the string encapsulation can be removed)

Make ScriptedMethods class static and convert the methods into extension methods (really just for the hell of it)
Make some of the comments a little less verbose in terms of number of lines
Some Resharper inspired simplifications
Other code reformatting to make consistent with other parts of the project (switch case statements should have braces, ContinueWith blocks reformatted to match others)
Untabify ScriptedMethodsTest.html
Remove unused usings from ScriptedMethods
Add a few comments about camelCaseJavascriptNames
This commit is contained in:
amaitland
2015-12-30 09:57:34 +10:00
parent 0db20550ae
commit d6fbe2e60b
6 changed files with 140 additions and 145 deletions
@@ -22,13 +22,13 @@ namespace CefSharp.Example
/// invoked in the Javascript environment when some event of interest
/// happens.
/// </summary>
/// <param name="eventName">
/// The name of the event.
/// </param>
/// <param name="eventData">
/// Data provided by the invoker pertaining to the event.
/// </param>
public void raiseEvent (string eventName, object eventData = null)
/// <param name="eventName">The name of the event.</param>
/// <param name="eventData">Data provided by the invoker pertaining to the event.</param>
/// <remarks>
/// By default RaiseEvent will be translated to raiseEvent as a javascript function.
/// This is configurable when calling RegisterJsObject by setting camelCaseJavascriptNames;
/// </remarks>
public void RaiseEvent(string eventName, object eventData = null)
{
if (EventArrived != null)
{