When using a custom a IConsoleLogger its Log() method is never called
Here is the AngleSharp code. Note that the source html contains a script that calls: console.log("Oi!").
var source = "<!DOCTYPE html><html lang='en'><body><script>console.log('Oi!');</script></body></html>";
var config = Configuration.Default.WithJs().WithConsoleLogger(ctx => new MyConsoleLogger());
var context = BrowsingContext.New(config);
var document = await context.OpenAsync(req => req.Content(source));
Here is the code for MyConsoleLogger
public class MyConsoleLogger : IConsoleLogger
{
public MyConsoleLogger()
{
Debug.Log("MyConsoleLogger constructed");
}
public void Log(object[] values)
{
Debug.Log("console.log called");
}
}
MyConsoleLogger is constructed but the log method is never called
When using a custom a IConsoleLogger its Log() method is never called
Here is the AngleSharp code. Note that the source html contains a script that calls: console.log("Oi!").
Here is the code for MyConsoleLogger
MyConsoleLogger is constructed but the log method is never called