public IJavascriptObject ExecuteFunction(IWebView webViewGeneric, IJavascriptObject context, params IJavascriptObject[] parameters)
        {
            var webView = webViewGeneric as AwesomiumWebView;

            if (webView == null)
            {
                return(null);
            }

            return(new JSValue_JavascriptObject(webView.ExecuteFunction(_JSValue, context.Convert(), parameters.Select(el => el.Convert()).ToArray())));
        }
Exemplo n.º 2
0
        public IJavascriptObject ExecuteFunction(IWebView context)
        {
            var webView = context as AwesomiumWebView;

            if (context == null)
            {
                return(null);
            }

            return(new JSValue_JavascriptObject(webView.ExecuteFunction(_JSValue)));
        }
        public void ExecuteFunctionNoResult(IWebView webViewGeneric, IJavascriptObject context, params IJavascriptObject[] parameters)
        {
            var webView = webViewGeneric as AwesomiumWebView;

            if (webView == null)
            {
                return;
            }

            var realContext = (context != null) ? context.Convert() : (JSValue) new JSObject();

            webView.ExecuteFunction(_JSValue, realContext, parameters.Select(el => el.Convert()).ToArray());
        }
Exemplo n.º 4
0
 public Task <IJavascriptObject> InvokeAsync(string iFunctionName, IWebView iContext, params IJavascriptObject[] iparam)
 {
     return(Task.FromResult(Invoke(iFunctionName, iContext, iparam)));
 }
Exemplo n.º 5
0
        public IJavascriptObject Invoke(string iFunctionName, IWebView context, params IJavascriptObject[] iparam)
        {
            var res = ((JSObject)_JSValue).Invoke(iFunctionName, iparam.Select(c => c.Convert()).ToArray());

            return(res.Convert());
        }
Exemplo n.º 6
0
        public void Bind(string iFunctionName, IWebView iContext, Action <string, IJavascriptObject, IJavascriptObject[]> action)
        {
            JSObject ob = _JSValue;

            ob.Bind(iFunctionName, false, (o, e) => { action(iFunctionName, null, e.Arguments.Select(el => el.Convert()).ToArray()); });
        }
 public void InvokeNoResult(string iFunctionName, IWebView context, params IJavascriptObject[] iparam)
 {
     ((JSObject)_JSValue).Invoke(iFunctionName, iparam.Select(c => c.Convert()).ToArray());
 }
 public void Bind(string iFunctionName, IWebView iContext, Action<string, IJavascriptObject, IJavascriptObject[]> action)
 {
     JSObject ob = _JSValue;
     ob.Bind(iFunctionName, false, (o, e) => { action(iFunctionName, null, e.Arguments.Select(el => el.Convert()).ToArray()); });
 }
 public Task<IJavascriptObject> InvokeAsync(string iFunctionName, IWebView iContext, params IJavascriptObject[] iparam)
 {
     return Task.FromResult(Invoke(iFunctionName, iContext, iparam));
 }
 public IJavascriptObject Invoke(string iFunctionName, IWebView context, params IJavascriptObject[] iparam)
 {
     var res = ((JSObject)_JSValue).Invoke(iFunctionName, iparam.Select(c => c.Convert()).ToArray());
     return res.Convert();
 }
        public IJavascriptObject ExecuteFunction(IWebView context)
        {
            var webView = context as AwesomiumWebView;
            if (context == null)
                return null;

            return new JSValue_JavascriptObject(webView.ExecuteFunction(_JSValue));
        }
Exemplo n.º 12
0
        public void BindArguments(string functionName, IWebView webView, Action <IJavascriptObject, IJavascriptObject, IJavascriptObject, IJavascriptObject> action)
        {
            Action <string, IJavascriptObject, IJavascriptObject[]> neededAction = (_, __, arg) => action(arg[0], arg[1], arg[2], arg[3]);

            Bind(functionName, webView, neededAction);
        }
Exemplo n.º 13
0
        public void Bind(string functionName, IWebView webView, Action <IJavascriptObject[]> action)
        {
            Action <string, IJavascriptObject, IJavascriptObject[]> neededAction = (_, __, arg) => action(arg);

            Bind(functionName, webView, neededAction);
        }