using AngleSharp.Parser.Html;
using AngleSharp.Scripting.JavaScript.Services;
public static void Main()
var config = Configuration.Default.WithJavaScript().WithCss();
var parser = new HtmlParser(config);
var source = @"<!doctype html><html><body><div id='test'>content</div></body>";
var document = parser.Parse(source);
var jsService = config.Services.OfType<JavaScriptProvider>().FirstOrDefault(x => x.Engine.Type == "text/javascript");
var jintEngine = jsService.Engine.GetOrCreateJint(document);
var result = jintEngine.Execute("document.querySelectorAll('#test').innerHTML").GetCompletionValue();
Console.WriteLine(result);