コード例 #1
0
 private void Initialize()
 {
     _js = _webView.CreateGlobalJavascriptObject("sharpAngieBridge");
     _js.Bind("initialize", false, (x, y) => _bridge.Initialize(string.Empty));
     _js.Bind("setProperty", false, SetViewModelProperty);
     _js.Bind("invokeMethod", false, InvokeViewModelMethod);
 }
コード例 #2
0
        private void BindMethods(IWebView _webView)
        {
            JSValue result = _webView.CreateGlobalJavascriptObject("app");

            if (result.IsObject)
            {
                JSObject appObject = result;
                appObject.Bind("login", false, new JavascriptMethodEventHandler(Login));
            }
        }
コード例 #3
0
        public JSObject CreateJSO()
        {
            string Name = string.Format("{0}_{1}", _NameScape, ++_Count);

            return(_IWebView.EvaluateSafe(() => _IWebView.CreateGlobalJavascriptObject(Name)));
        }