Closed DmitriiShamrikov closed 5 years ago
Are the tests running for you? Question is of course related to the fact that the tests use jQuery. What I imagine is that you need WithCss()
depending on the version of jQuery (some make some tests against it and refuse to work without a proper CSSOM).
Yes, JqueryTests are running. But it uses jquery 1.11.2 and 2.1.4. If I run your tests with 1.12.4 and 2.2.4, latest for this moment, it behaves unsatable - only random 0-3 of 7 tests pass.
Also i tried to change jquery version in my example to one that you use and it became working (adding WithCss()
).
So i think there is something in latest jquery versions that AngleSharp can't handle.
Yes it could be. jQuery uses a lot of DOM APIs and if some are not exposed from AngleSharp.Scripting (or even missing, e.g., layout specific ones, which are not part of the AngleSharp.Core package) then jQuery will unfortunately fail to load.
I am unsure if this should be closed. On the one hand this is a known thing and the AngleSharp.Scripting project is still far away from production ready or claiming that it can run any script. On the other hand running jQuery (any version) should be / was the goal for this POC.
There are multiple issues. Some of them are fixed and all noted versions are working sometimes. The reason for the hiccup is somewhere in the event loop (most likely related to setTimeout
after some initial investigation) and have to be fixed directly in the core.
AngleSharp v0.13 will come with a new event loop that already satisfies the requirements for modern JS stacks.
Landed in devel
.
That's my test page:
And that's my code:
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