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
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