alloc static method
JSStaticFunctionRef
alloc({
- String? name,
- Pointer<
NativeFunction< ? callAsFunction,JSObjectCallAsFunctionCallback_> > - int attributes = 0,
Implementation
static JSStaticFunctionRef alloc({
String? name,
Pointer<NativeFunction<JSObjectCallAsFunctionCallback_>>? callAsFunction,
int attributes = 0,
}) {
final pointer = calloc<JSStaticFunction_>(1);
pointer.ref
..name = name?.toNativeUtf8() ?? nullptr
..callAsFunction = callAsFunction ?? nullptr
..attributes = attributes;
return pointer;
}