Notalib / nativescript-webview-ext

Nativescript plugin with extended WebView functionality
Apache License 2.0
76 stars 37 forks source link

How can I call NativeScript (Vue) function from WebView #131

Closed meverikxp closed 2 years ago

meverikxp commented 2 years ago

I need call NativeScript (Vue) function from webview Can you give me example for NativeScript Vue how I can do it? Thank you!

m-abs commented 2 years ago

You can't call NativeScript functions directly from the WebView.

But you can emit events from the WebView like this:

window.nsWebViewBridge.emit("my-vue-event", { "hallo": "there" });
meverikxp commented 2 years ago

Yes, I did it, thank you