void FWebJSScripting::InvokeJSFunction(FGuid FunctionId, int32 ArgCount, FWebJSParam Arguments[], bool bIsError) { CefRefPtr<CefListValue> FunctionArguments = CefListValue::Create(); for ( int32 i=0; i<ArgCount; i++) { SetConverted(FunctionArguments, i, Arguments[i]); } InvokeJSFunction(FunctionId, FunctionArguments, bIsError); }
void FWebJSScripting::InvokeJSFunction(FGuid FunctionId, int32 ArgCount, FWebJSParam Arguments[], bool bIsError) { CefRefPtr<CefListValue> FunctionArguments = CefListValue::Create(); for ( int32 i=0; i<ArgCount; i++) { SetConverted(FunctionArguments, i, Arguments[i]); } CefRefPtr<CefProcessMessage> Message = CefProcessMessage::Create(TEXT("UE::ExecuteJSFunction")); CefRefPtr<CefListValue> MessageArguments = Message->GetArgumentList(); MessageArguments->SetString(0, *FunctionId.ToString(EGuidFormats::Digits)); MessageArguments->SetList(1, FunctionArguments); MessageArguments->SetBool(2, bIsError); SendProcessMessage(Message); }