I'm a beginner of javafx. this is my function of javascript in my html file
function setMap(mapExtent) {
if (mapExtent) {
var args = mapExtent.split(",");
if (args.length >= 4) {
frx = parseFloat(args[0]);
fry = parseFloat(args[1]);
frzoom = parseInt(args[2]);
frMapType = args[3];
if (pMap) {
pMap.SetMap(mapExtent);
}
}
}
}
I know how to invoke it in C#, like this:
public void setMap(string sExtend)
{
object[] objArray = new object[1];
objArray[0] = sExtend;
try
{
this.Document.InvokeScript("setMap", objArray);
}
catch { }
}
this javascript function need pass a parameter(a javascript object), but in the API document of JAVAFX8, the parameter of method webengine.executeScript(String script) is a String type only. How to use webengine.executeScript() invoke the setMap(string sExtend)