A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/AngleSharp/AngleSharp.Js/issues/42 below:

window.onload doesn't fire · Issue #42 · AngleSharp/AngleSharp.Js · GitHub

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?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4