Execute Javascript function in my web view from Lua code

I have a web view (using newWebView) and I’d like to call a Javascript function from within my Lua code. This is possible for native iOS and Android code so my question is if this is possible with Lua too.

Example:

//This is the JS function function callback(param){  //Do something                }   

local webView = native.newWebView( 0, 0, 320, 480 ) webView:request("template.html", system.ResourceDirectory) //This is where I want to call the JS function webView:executeJS("callback", 2)  

We don’t support any communications between the webView and your Corona App other than monitoring the click events on links.

We don’t support any communications between the webView and your Corona App other than monitoring the click events on links.

With newWebView, can you do something like the following?  i.e. just refresh the HTML page with a query string that passes the function name to be executed with, possibly, some parameters?    Then, within the HTML page onload event handler, read the query string and execute the named function with one or more parameters?

local webView = native.newWebView( 0, 0, 320, 480 )

webView:request(“template.html ?function=myFunction&parameter1=myParam1”, system.ResourceDirectory)

(once I enable my Pro license I’ll be able to test this myself)

With newWebView, can you do something like the following?  i.e. just refresh the HTML page with a query string that passes the function name to be executed with, possibly, some parameters?    Then, within the HTML page onload event handler, read the query string and execute the named function with one or more parameters?

local webView = native.newWebView( 0, 0, 320, 480 )

webView:request(“template.html ?function=myFunction&parameter1=myParam1”, system.ResourceDirectory)

(once I enable my Pro license I’ll be able to test this myself)