Skip to content

window.onload doesn't fire #42

@DmitriiShamrikov

Description

@DmitriiShamrikov

I have a page like this:

<html>
<head>
	<title>test page</title>
	<script>
	window.onload = function() {
		document.body.appendChild( document.createTextNode( 'test' ))
	}
	</script>
</head>
<body></body>
</html>

And code that loads it:

var config = Configuration.Default.WithDefaultLoader().WithJavaScript();
var browser = BrowsingContext.New( config );
var doc = browser.OpenAsync( url ).Result;
Console.WriteLine( doc.Body.OuterHtml );

The output supposed to be <body>test</body> but it is <body></body>.
Am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions