Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass ArrayBuffer to webview c-side function? #54

Open
dbadb opened this issue May 10, 2024 · 2 comments
Open

Pass ArrayBuffer to webview c-side function? #54

dbadb opened this issue May 10, 2024 · 2 comments

Comments

@dbadb
Copy link

dbadb commented May 10, 2024

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.

@julianstorer
Copy link
Collaborator

Yes, I was leaving that one until later, as I'm also not sure the best plan!

@dbadb
Copy link
Author

dbadb commented May 10, 2024

Here's a related thread I stumbled across - hadn't heard that Photoshop was webview-ing...

https://forums.creativeclouddeveloper.com/t/webview-postmessage-with-arraybuffer-terribly-slow/7055/12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants