Async scripts execute before preceding synchronous scripts, causing ReferenceError and premature load event
Async scripts execute before preceding synchronous scripts, causing ReferenceError and premature load event: a task in LegoFlow-SWE (Harbor dataset). When an HTML document contains both synchronous ( <script ) and asynchronous ( <script async ) scripts, jsdom may execute the async script before…
The task
When an HTML document contains both synchronous (`<script>`) and asynchronous (`<script async>`) scripts, jsdom may execute the async script **before** the synchronous script that precedes it in the DOM. This breaks real browser semantics and leads to unpredictable runtime errors, such as `ReferenceError`, when the…
Part of Lego-X/LegoFlow-SWE.