Skip to content

AngleSharp doesn't seem to work with jQuery #43

@DmitriiShamrikov

Description

@DmitriiShamrikov

That's my test page:

<html>
<head>
	<title>test page</title>
	<script type='text/javascript' src='https://code.jquery.com/jquery-2.2.4.js'></script>
</head>
<body></body>
</html>

And that's my code:

var config = Configuration.Default
	.WithDefaultLoader( _ => _.IsResourceLoadingEnabled = true, new[] { new HttpClientRequester() } )
	.WithJavaScript();
var browser = BrowsingContext.New( config );
var doc = browser.OpenAsync( url ).Result;
var jsp = config.Services.OfType<JavaScriptProvider>().First();
jsp.Engine.EvaluateScript( doc, "jQuery" );

It throws an exception "Jint.Runtime.JavaScriptException : jQuery is not defined". I tried different jQuery versions (1.12.4, 2.2.4, 3.2.1, minified and uncompressed) - nothing worked.
AngleSharp version: 0.9.9
AngleSharp.Scripting version: 0.5.1
jint version: 2.10.4

Help please

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions