G Grant Fullen Member Licensed User Longtime User Dec 5, 2017 #1 I have a straightforward JS function that returns a value. It's all working in the WKWebView. However, Result just returns Null in the JSComplete event. How can I get the return value from my JS function to the Result parameter in that function?
I have a straightforward JS function that returns a value. It's all working in the WKWebView. However, Result just returns Null in the JSComplete event. How can I get the return value from my JS function to the Result parameter in that function?
Erel B4X founder Staff member Licensed User Longtime User Dec 6, 2017 #2 Example: Code: WKWebView1.EvaluateJavaScript("", $" x = 100; y = 100; x + y; "$) Wait For wkWebView1_JSComplete (Success As Boolean, Tag As Object, Result As String) If Success Then Log(Result) End If Upvote 0
Example: Code: WKWebView1.EvaluateJavaScript("", $" x = 100; y = 100; x + y; "$) Wait For wkWebView1_JSComplete (Success As Boolean, Tag As Object, Result As String) If Success Then Log(Result) End If
G Grant Fullen Member Licensed User Longtime User Dec 6, 2017 #3 I didn't know you could use a Wait For. Hopefully that'll do it because the Javascript I'm executing does in fact have to wait for the web to return the data. Upvote 0
I didn't know you could use a Wait For. Hopefully that'll do it because the Javascript I'm executing does in fact have to wait for the web to return the data.
Erel B4X founder Staff member Licensed User Longtime User Dec 6, 2017 #4 You can use Wait For with all events. Upvote 0