private void ViewValueSetter(string bindingName, object value) { string valueText = value == null ? string.Empty : value.ToString(); string script = string.Format( "htmlViewBindingsSetValue('{0}', '{1}');", bindingName, valueText); _htmlView.ExecuteJavaScript(script); }
private void ViewValueSetter(string bindingName, object value) { string valueText = WebviewUtils.EscapeJavaScriptString(value?.ToString()); string script = string.Format( "htmlViewBindingsSetValue('{0}', '{1}');", bindingName, valueText); _htmlView.ExecuteJavaScript(script); }
/// <summary> /// Creates and executes the JavaScript which creates a Vue instance and adds the necessary /// properties and event handlers. Call this method not before the DOM content is loaded, /// alternatively the script can be inserted directly into the HTML, see <see cref="BuildVueScript"/>. /// </summary> public void InitializeVue() { string vueScript = BuildVueScript(); _htmlView.ExecuteJavaScript(vueScript); }