so i switched to webview2 cuz webbrowser was laggy
htmldocument isnt found in webview2 so
how do i make this code saves all text in html
HtmlDocument document = this.webBrowser1.Document;
string scriptName = "GetText";
object[] array = new string[0];
object[] array2 = array;
object[] args = array2;
object obj = document.InvokeScript(scriptName, args);
string text = obj.ToString();
using (SaveFileDialog saveFileDialog = new SaveFileDialog())
{
saveFileDialog.Filter = "Lua Script (.lua)|.lua|Text File (.txt)|.txt|All Files (.)|.";
saveFileDialog.Title = "Zeus Save file.";
saveFileDialog.ShowDialog();
try
{
string fileName = saveFileDialog.FileName;
string text2 = text;
string[] contents = new string[]
{
text2.ToString(),
""
};
File.WriteAllLines(saveFileDialog.FileName, contents);
}
catch (Exception)
{
}
}
}