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
This is currently employed under the hood and doesn't require any action from end-user, but costs an extra allocation when unmarshalling from JS to C#.
Workaround 2
Wrap the call into two: first to wait for the async operation, second to get the array in a blocking manner, eg:
.NET's JS interop currently is only able to marshal types with single-level nesting:
— hence we have to handle otherwise natively-supported arrays (eg,
Task<byte[]>
) in a special manner.Workaround 1Update: This workaround seems to no longer work in .NET 8.0.1, where it throws an error stating proxy for the associated method is not found.
Lift the array to
object
and marshal asJSType.Any
:This is currently employed under the hood and doesn't require any action from end-user, but costs an extra allocation when unmarshalling from JS to C#.
Workaround 2
Wrap the call into two: first to wait for the async operation, second to get the array in a blocking manner, eg:
The text was updated successfully, but these errors were encountered: