Esempio n. 1
0
        private void OnLoadFinish(string url)
        {
            string javaScriptCode = $"{InjectJavaScriptCode}\n" +
                                    "hideControls();\n" +
                                    $"setName(\"{User.GetActiveUser().UserName}\");";

            webBrowserUI.ExecuteJs(javaScriptCode);
        }
Esempio n. 2
0
        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);
        }