Hi,
We recently upgraded to the latest version of jint (from 2.10.4 --> 2.11.58) and noticed that the test below breaks. It looks like the DOMContentLoaded event is not triggered and the original HTML document never gets modified when it's loaded.
public void ExecuteOnLoadJavaScriptTest()
{
// arrange
var html = "FAILED
" +
"";
// act
var config = Configuration.Default.WithJavaScript();
var parser = new HtmlParser(config);
var document = parser.Parse(html);
while (document.ReadyState != DocumentReadyState.Complete)
{
// javascript processing is asynchronous, need to wait until document state is complete
Thread.Sleep(100);
}
var result = document.DocumentElement.OuterHtml;
// assert
result.Should().StartWith("SUCCESS
");
}
Hi,
We recently upgraded to the latest version of jint (from 2.10.4 --> 2.11.58) and noticed that the test below breaks. It looks like the DOMContentLoaded event is not triggered and the original HTML document never gets modified when it's loaded.