public static Task<CefV8Value> InvokeAsync(this CefV8Value @this, string functionname, IWebView context, params CefV8Value[] args)
 {
     
     return context.EvaluateAsync(() =>
         {
             var fn = @this.GetValue(functionname);
             if ((fn==null) || !fn.IsFunction)
                 return CefV8Value.CreateUndefined();
             return fn.ExecuteFunction(@this, args);
         }
         );
 }
Example #2
0
 public static Task <CefV8Value> InvokeAsync(this CefV8Value @this, string functionname, IWebView context, params CefV8Value[] args)
 {
     return(context.EvaluateAsync(() =>
     {
         var fn = @this.GetValue(functionname);
         if ((fn == null) || !fn.IsFunction)
         {
             return CefV8Value.CreateUndefined();
         }
         return fn.ExecuteFunction(@this, args);
     }
                                  ));
 }
Example #3
0
 public static Task <CefV8Value> InvokeAsync(this CefV8Value @this, string functionname, IWebView context, params CefV8Value[] args)
 {
     return(context.EvaluateAsync(() => @this.Execute(functionname, args)));
 }
        public async Task RegisterMainViewModel(IJavascriptObject jsObject)
        {
            var task = await _WebView.EvaluateAsync(() => UnsafeRegister(jsObject));

            await task;
        }
Example #5
0
 protected T GetSafe <T>(Func <T> unsafeGet)
 {
     return(_WebView.EvaluateAsync(unsafeGet).Result);
 }
Example #6
0
 public Task <IJavascriptObject> GetAttributeAsync(IJavascriptObject value, string attributeName)
 {
     return(_WebView.EvaluateAsync(() => value.GetValue(attributeName)));
 }
 public static Task<CefV8Value> InvokeAsync(this CefV8Value @this, string functionname, IWebView context, params CefV8Value[] args)
 {
     return context.EvaluateAsync(() => @this.Execute(functionname, args));
 }