Hi,
I am using version 2.20.
Since release 2.19, I think that support has been added for async script loading and that cause me a problem.
In one page, I have the code
<script async="async" src='/xx.js1' onload="someFct();"></script>
With release 2.20 (was not the case with 2.18), this script is no more loaded.The script is needed in the page and should be loaded but it is not the case.
Is there an option we can set to the WebClient to disable async loading ?
Regards,
Christophe
The way is not to disable async loading, but to fix the issue instead.
Please try to submit a test case as a patch.
Also, do you wait() enough? Please read http://htmlunit.sourceforge.net/faq.html#AJAXDoesNotWork
Hi Ahmed,
Thank you for the answer. I think I wait enough. Here is my code:
I also set a breakpoint (waiting several seconds) after the getPage in debug and I do not see that the script is downloaded.
Regards,
Christophe
There is already a working test case in https://sourceforge.net/p/htmlunit/code/HEAD/tree/trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLScriptElementTest.java#l986
Please isolate yours.
Hi,
I did not succeed to isolate the problem in a simple case.
From what I see, the js is loaded but the javascript called in the onload event of the <script> tag is not executed (and it was in version 2.18).</p> <p>Regards,<br> Christophe</p></script>