private void OnLoadFinish(string url) { string javaScriptCode = $"{InjectJavaScriptCode}\n" + "hideControls();\n" + $"setName(\"{User.GetActiveUser().UserName}\");"; webBrowserUI.ExecuteJs(javaScriptCode); }
private async UniTaskVoid SendJs() { await UniTask.WaitUntil(() => webBrowserUI.browserClient.IsRunning); string javaScriptCode = $"class UserDetails {{ constructor(username) {{ this.UserName = username; }} }}" + $"let userDetails = new UserDetails(\"{User.DefaultAccount.AccountName}\");"; webBrowserUI.ExecuteJs(javaScriptCode); }