@JsType(isNative=true,
name="Function",
namespace="<global>")
public class NativeFunction
extends Object
| Constructor and Description |
|---|
NativeFunction(String... paramsAndCode)
Creates a new function with the given parameters and implementation.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
apply(Object thisArg,
JsArray<?> arguments)
Invokes this function with a given
this and arguments
provided as an array. |
Object |
call(Object thisArg,
Object... arguments)
Invokes this function with a given
this and arguments
provides as varargs. |
static <T> T |
create(String... paramsAndCode)
Creates a new function with the given parameters and implementation.
|
public NativeFunction(String... paramsAndCode)
paramsAndCode - parameter names followed by the code of the functionpublic Object apply(Object thisArg, JsArray<?> arguments)
this and arguments
provided as an array.thisArg - the value of thisarguments - an array of argumentspublic Object call(Object thisArg, Object... arguments)
this and arguments
provides as varargs.thisArg - the value of thisarguments - the arguments to invoke this function with@JsOverlay public static <T> T create(String... paramsAndCode)
@JsFunction.T - the function typeparamsAndCode - parameter names followed by the code of the functionCopyright © 2000–2026 Vaadin Ltd. All rights reserved.