I have a Java Selenium library project that includes JavaScript snippets for use with the executeScript
method of the JavascriptExecutor interface. These snippets are stored in files with the js
extension so that my IDE will apply syntax highlighting when I open them.
The JavaScript code in these files is intentionally incomplete because Selenium automatically wraps them in an anonymous closure for execution. When Lift analyzes these files, it reports a JSC_PARSE_ERROR:
Parse error. return must be inside function
Is there some way I can provide Lift with a hint that will enable it to handle the content of these files as it gets processed by the Selenium API?