I use WebViewString to communicate between html and app.
To be able to send many data, i use JSON. So when a Button is clicked in APP ( or whatever event you want ) you can prepare JSON string to contain your data for the HTML. and send the JSON as WebViewString.
In HTML you have to catch WebViewString change event (with javascript) and process the JSON data.
And the opposite, when you click a Button or whatever event you want, prepare JSON string and send it back to app with WebViewString.
Fixed bug in CurrentId method (it was not resetting after removing webview)
Fixed bug in GetCookies method (it was returning null instead of empty string)
Thanks to @sonumohammad333 for reporting bug
Documentation
Since first post is no longer editable (lag issues) so here is documentation for new blocks.
On Close Window Request
Event triggered when a window needs to be closed
id ~ int
Create Shortcut
Creates a shortcut of given website on home screen
url ~ text
iconPath ~ text
title ~ text
Load In New Window
Loads requested url in given webview
id ~ int
Pause WebView
Does a best-effort attempt to pause any processing that can be paused safely, such as animations and geolocation. Note that this call does not pause JavaScript.
id ~ int
Post Data
Loads the URL with postData using ‘POST’ method into active WebView.
url ~ text
data ~ text
Resume WebView
Resumes the previously paused WebView.
id ~ int
Set Cookies
url ~ text
cookieString ~ text
Initial Scale
Sets the initial scale for active WebView. 0 means default. If initial scale is greater than 0, WebView starts with this value as initial scale.
I don’t know, if it’s a mistake or if I misconfigured the extension but it was commented on a website and asked me to log in to Facebook so I could post my comment but I click the start button and nothing appears, not even a pop-up window
Thank you so much. You are wonderful
It has worked smoothly right now.
I will have one last request from you;
After the user clicks the file upload button, can we offer new photo taking and photo selection from the gallery at the same time?
Yes you can.
Simply show a bottom sheet with options for uploading files like camera, gallery, sound recorder ,etc.
But I would like to mention one thing that it is not recommended to capture images using a camera or recording sound using a sound recorder unless isCaptureEnabled is true.