invokeModuleEvent function
void
invokeModuleEvent(
- int contextId,
- String moduleName,
- Event? event,
)
Implementation
void invokeModuleEvent(
int contextId, String moduleName, Event? event, String extra) {
if (KrakenController.getControllerOfJSContextId(contextId) == null) {
return;
}
Pointer<NativeString> nativeModuleName = stringToNativeString(moduleName);
Pointer<Void> rawEvent = event == null ? nullptr : event.toRaw().cast<Void>();
_invokeModuleEvent(
contextId,
nativeModuleName,
event == null ? nullptr : event.type.toNativeUtf8(),
rawEvent,
stringToNativeString(extra));
freeNativeString(nativeModuleName);
}