You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hooking into the script message mechanism by using a userContentController and WKScriptMessageHandler
nothing seems to work.
even an alert does not fire.
Here is my webview plugin
var str = "<html><body><h1>Add text below</h1><input type='text' name='email' id='email'/><button onclick='window.open(\"http:\\www.cnn.com\"); '>Click me</button></body></html>";
var url = new Uri.dataFromString(str, mimeType: 'text/html').toString();
flutterWebviewPlugin.launch(url,
rect: new Rect.fromLTWH(
00.0, 100.0, 300.0, 440.0));
the navigation to cnn.com does not happen on button click.
I also tried to just do an alert but did not work.
var str = "<html><body><h1>Add text below</h1><input type='text' name='email' id='email'/><button onclick='alert(\"test message\"); '>Click me</button></body></html>";
what seems to be the issue? any ideas?
The text was updated successfully, but these errors were encountered:
manujbahl
changed the title
how doe i pass messages back from the html page to ios ?
How do I pass messages back from the html page to ios ?
Aug 21, 2018
manujbahl
changed the title
How do I pass messages back from the html page to ios ?
How do I pass messages back from the html page to native ?
Aug 21, 2018
first of all, set enableJavascript to true when launching webiew. if you want to push messages to native from website, you need to use some javascript redirection for urls and listen to them in native.
I tried a couple things.
nothing seems to work.
even an alert does not fire.
Here is my webview plugin
the navigation to cnn.com does not happen on button click.
I also tried to just do an alert but did not work.
what seems to be the issue? any ideas?
The text was updated successfully, but these errors were encountered: