public interface JavaScript
| Modifier and Type | Method and Description |
|---|---|
default void |
callFunction(String name)
Calls JavaScript function.
|
default <T> T |
callFunction(String name,
Class<T> returnType) |
default <T> T |
callFunction(String name,
Class<T> returnType,
Object... arguments)
Calls JavaScript function.
|
default Object |
evaluate(String expression)
Evaluates JavaScript expression in global scope.
|
Session |
getThis() |
default <T> T |
getVariable(String name,
Class<T> returnType)
Gets JavaScript variable.
|
default void |
setVariable(String name,
Object newValue)
Sets JavaScript variable.
|
default Object evaluate(String expression)
expression - JavaScript expressiondefault void callFunction(String name)
Function must be declared at the global (window object) scope. You can use dot notation for function name.
name - function namedefault <T> T callFunction(String name, Class<T> returnType, Object... arguments)
Function must be declared at the global (window object) scope. You can use dot notation for function name.
name - function namereturnType - return type of functionarguments - function argumentsdefault <T> T getVariable(String name, Class<T> returnType)
Variable must be declared at the global (window object) scope. You can use dot notation for variable name.
name - variable namereturnType - variable typedefault void setVariable(String name, Object newValue)
Variable must be declared at the global (window object) scope. You can use dot notation for variable name.
name - variable namenewValue - valueSession getThis()
Copyright © 2017 WebFolder OÜ. All rights reserved.