@JsType(isNative=true, name="Function", namespace="<global>") public final class NativeCallback extends Object
Modifier and Type | Method and Description |
---|---|
static NativeCallback |
create(String code)
Creates a callback in java script.
All options in the configuration which can be set like scriptable, can be set with a native callback. The callback can receive only 1 argument, the scriptable context. |
static NativeCallback |
create(String argument,
String code)
Creates a callback in java script.
All options in the configuration which can be set like scriptable, can be set with a native callback. The callback can receive only 1 argument, the scriptable context. |
String |
toSource()
Returns a string representing the source code of the function.
|
@JsOverlay public static NativeCallback create(String code)
context
".code
- the code of the callbck to execute@JsOverlay public static NativeCallback create(String argument, String code)
argument
- name of the scriptable context variable to use in the java script code.code
- the code of the callbck to execute