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); }
private void BindMethods(IWebView _webView) { JSValue result = _webView.CreateGlobalJavascriptObject("app"); if (result.IsObject) { JSObject appObject = result; appObject.Bind("login", false, new JavascriptMethodEventHandler(Login)); } }
public JSObject CreateJSO() { string Name = string.Format("{0}_{1}", _NameScape, ++_Count); return(_IWebView.EvaluateSafe(() => _IWebView.CreateGlobalJavascriptObject(Name))); }