private void RhodesWebBrowser_JSNotify(object sender, NotifyEventArgs e) { String answer = CRhoRuntime.getInstance().onJSInvoke(e.Value); RhodesWebBrowser.IsScriptEnabled = true; RhodesWebBrowser.InvokeScript("nativeCallback", new string[] { answer }); }
public string executeScriptFunc(string script, int index) { string[] codeString = { script }; if (isDefaultBrowser()) { return(RhodesWebBrowser.InvokeScript("eval", codeString).ToString()); } else { return(((WebBrowser)((PivotItem)TabbarPivot.Items[getValidTabbarIndex(index)]).Content).InvokeScript("eval", codeString).ToString()); } }
public string executeScriptFunc(string script, int index) { string[] codeString = { script }; if (TabbarPivot.Items.Count == 0 || _isCallbackFired)//_tabProps[index]._isInitialized == false) { _isCallbackFired = false; return(RhodesWebBrowser.InvokeScript("eval", codeString).ToString()); } else { return(((WebBrowser)((PivotItem)TabbarPivot.Items[getValidTabbarIndex(index)]).Content).InvokeScript("eval", codeString).ToString()); } }