webview_dart icon indicating copy to clipboard operation
webview_dart copied to clipboard

Sending data back to javascript using handlers

Open mohammedX6 opened this issue 1 year ago • 1 comments

How to send data to javascript ?

mohammedX6 avatar May 13 '23 07:05 mohammedX6

You can use eval() to send data to the browser window, but because webview blocks the event loop this is mostly useless.

UPD. You can use one-way binding with bind() -> eval(), but for some reason it doesn't work with bindings from this repository (and given that they were last updated 2 years ago, it's not surprising that something isn't working). image

I tried creating a binding based on the latest version of webview using ffigen and it worked. image

JoCat avatar Jan 19 '24 16:01 JoCat