Skip to content

JavaScript DOMContentLoaded not triggered after upgrading Jint #50

Description

@mdesousa

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
"); }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions