webview_deno icon indicating copy to clipboard operation
webview_deno copied to clipboard

Communication between 2 webviews

Open parliament718 opened this issue 4 years ago • 3 comments

What is the best way to communicate between 2 or more webviews? (ex, click button in one, changes color in another)

parliament718 avatar Jun 02 '20 11:06 parliament718

Related to #12, it would be possible thru websockets but not currently using the built in invoke handler (which is not yet implemented).

eliassjogreen avatar Jun 02 '20 18:06 eliassjogreen

Web-sockets would be the platform agnostic method and normally platform agnostic is the way to go.

EDIT: If you mean going straight from one webview to the other (without touching the deno back-end) the WebRTC API would be your answer.

jcc10 avatar Sep 20 '20 17:09 jcc10

Ideally we want to use the webview_bind function but due to threading issues blocking the deno thread (because the op_webview_run is blocking) we cannot communicate between rust and deno and therefor not have the callbacks needed for implementing binding deno functions to a webview. But yes, webrtc is the way to go for this issue until #12 is fixed.

eliassjogreen avatar Sep 20 '20 22:09 eliassjogreen