Open kincsescsaba opened 1 month ago
Will have a look and maybe add a test case but if fear this works in general and is related to the jQuery initialization
The above example is simplified. I checked putting a $(document).ready
block also in scriptDeclaringAGlobalVar.js
, which successfully read aGlobalVar
. That's why I think the issue is related to handling scopes of multiple script includes.
@kincsescsaba Have just added a small test implementation to the test suite.
Can you please have a look at the test and check if i got your problem right.
I have an HTML loading multiple scripts:
scriptDeclaringAGlobalVar.js:
scriptReadingAGlobalVar.js:
Though the global variable is declared in the first script, and even
$(document).ready
was used, it can't be reached, I get errors like this in HtmlUnit:The same works fine in browsers.