cefsharp 执行 js 并返回结果
private async void button1_Click(object sender, EventArgs e) { var response = await browser.EvaluateScriptAsync("document.title"); if (response.Success) MessageBox.Show(response.Result?.ToString()); response = await browser.EvaluateScriptAsync("function add(a,b){ return a + b; }"); response = await browser.EvaluateScriptAsync("add(2,3)"); if (response.Success) MessageBox.Show(response.Result?.ToString()); }
桂棹兮兰桨,击空明兮溯流光。