public override async void SendCommands() { //compiler currently doesn't convert string[] correctly to a js string[] so make a string //instead and then eval it on the js side to get the string[] await JSExecutor.InvokeAsync <object>("addCommands", $"[{string.Join(",", QueuedCommands.Select(x => $"\"{x}\""))}]"); QueuedCommands.Clear(); }
public override void SendCommands() { if (QueuedCommands.Count > 0) { ExecuteJs(String.Join(String.Empty, QueuedCommands)); QueuedCommands.Clear(); } }