public ValueTask DispatchEvent(ElemRef e, string eventType) => mod.InvokeVoidAsync("Act.DispatchEvent", e.Key, eventType);
public ValueTask Click(ElemRef e) => mod.InvokeVoidAsync("Act.Click", e.Key);
public ValueTask SetValue(ElemRef e, string v) => // Useful for setting component values that are private mod.InvokeVoidAsync("Act.SetValue", e.Key, v);
public ValueTask <string> GetContent(ElemRef e, bool htmlFormat) => mod.InvokeAsync <string>("Act.GetContent", e.Key, htmlFormat);
public ValueTask <string> SetContent(ElemRef e, string newContent) => mod.InvokeAsync <string>("Act.SetContent", e.Key, newContent);
/// <summary> /// Get the html content of an html element. /// </summary> public ValueTask <string> HtmlContent(ElemRef e) => GetContent(e, true);
/// <summary> /// Get the text content of an html element /// </summary> public ValueTask <string> TextContent(ElemRef e) => GetContent(e, false);
/// <summary> /// Replace the content of an element with new content. /// </summary> public ValueTask <string> SetContent(ElemRef e, string html) => JS.SetContent(e, html);
// Simulating user actions in the browser is a security issue. // Manually firing events does NOT trigger default actions. // e.g. Firing a KeyEvent on a text field will not update the UI. //public ValueTask SendKeys(ElemRef e, string v) => JS.SendKeys(e, v); ValueTask <string> GetContent(ElemRef e, bool asHtml) => JS.GetContent(e, asHtml);
public ValueTask DispatchEvent(ElemRef e, string eType) => JS.DispatchEvent(e, eType);
/// <summary> /// Set html element.value = v /// </summary> public ValueTask SetValue(ElemRef e, string v) => JS.SetValue(e, v);
/// <summary> /// Send a click event to an html element. /// </summary> public ValueTask Click(ElemRef e) => JS.Click(e);