When parsing the following javascript htmlunit fails to parse. If "const" is removed from the for loop, then the parsing succeeds.
Minimal code example:
test.js
function checkSomethingToPrint() {
let arr = new Array();
for(const e of arr) {
alert("here");
}
}
test.html
<html>
<head>
<script src="test.js" type="text/javascript"></script>
</head>
</html>
App.java
import com.gargoylesoftware.htmlunit.*;
import com.gargoylesoftware.htmlunit.html.*;
import java.io.*;
public class App {
public static void main(String[] args) throws Exception {
try (final WebClient webClient = new WebClient()) {
File file = new File("test.html");
final HtmlPage page = webClient.getPage(file.toURI().toURL());
}
}
}
When parsing the following javascript htmlunit fails to parse. If "const" is removed from the for loop, then the parsing succeeds.
Minimal code example:
test.js
test.html
App.java