You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varinvokeTarget=VirtualView.InvokeJavaScriptTarget??thrownewInvalidOperationException($"The {nameof(IHybridWebView)}.{nameof(IHybridWebView.InvokeJavaScriptTarget)} property must have a value in order to invoke a .NET method from JavaScript.");
163
-
varinvokeTargetType=VirtualView.InvokeJavaScriptType??thrownewInvalidOperationException($"The {nameof(IHybridWebView)}.{nameof(IHybridWebView.InvokeJavaScriptTarget)} property must have a value in order to invoke a .NET method from JavaScript.");
164
+
varinvokeTargetType=VirtualView.InvokeJavaScriptType??thrownewInvalidOperationException($"The {nameof(IHybridWebView)}.{nameof(IHybridWebView.InvokeJavaScriptType)} property must have a value in order to invoke a .NET method from JavaScript.");
MauiContext?.CreateLogger<HybridWebViewHandler>()?.LogError(ex,"An error occurred while invoking a .NET method from JavaScript: {ErrorMessage}",ex.Message);
thrownewInvalidOperationException($"The method {requestMethodName} couldn't be found on the {nameof(jsInvokeTarget)} of type {jsInvokeTarget.GetType().FullName}.");
231
232
}
232
-
233
233
vardotnetParams=dotnetMethod.GetParameters();
234
234
if(requestParamsis not null&&dotnetParams.Length!=requestParams.Length)
235
235
{
236
236
thrownewInvalidOperationException($"The number of parameters on {nameof(jsInvokeTarget)}'s method {requestMethodName} ({dotnetParams.Length}) doesn't match the number of values passed from JavaScript code ({requestParams.Length}).");
237
237
}
238
238
239
+
// deserialize the parameters from JSON to .NET types
0 commit comments