choc icon indicating copy to clipboard operation
choc copied to clipboard

Pass ArrayBuffer to webview c-side function?

Open dbadb opened this issue 1 year ago • 2 comments

When I pass an ArrayBuffer to a webview-bound function (ie via webview->bind("myfunc", []...), choc declares the value to be an object. The object's type is reported as "" and the object has no named members. I see special code in the javascript V8 binding for ArrayBuffers, but this appears to be irrelevant for webview transfers since JSON.stringify is the serialization mechanism in play.

I think there are two potential workarounds: 1. convert the ArrayBuffer to an array, 2: use http post. #1 is certainly not-so-efficient and I've yet to explore #2 fwiw.

I'm guessing this is a known limitation but thought I'd submit this issue to place it on radar screens.

dbadb avatar May 10 '24 17:05 dbadb