public final class JavaScriptParser extends Object
callFunction(String, Object...)
can be used to invoke a JS function.| Constructor and Description |
|---|
JavaScriptParser(String scriptFileName)
Constructs new javascript parser for given .js file or source string.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
callFunction(String name,
Object... args)
Invokes a JS function.
|
public JavaScriptParser(String scriptFileName)
scriptFileName - name of script file under "/assets/scripts/" or source stringIllegalArgumentException - if syntax errorpublic <T> T callFunction(String name, Object... args)
T - return typename - function nameargs - function argumentsIllegalArgumentException - if any error occurred during invocationCopyright © 2017. All rights reserved.