Java Reference
In-Depth Information
Figure 9.7
JavaFX - JavaScript HTML Page
As you can see, calling JavaScript from JavaFX is fairly simple to implement.
Now let's explore the other way, JavaScript to JavaFX.
JavaScript to JavaFX
Calling JavaFX from JavaScript is fairly straightforward, but there are some
rules that you need to follow.
First, you need to add an id launch parameter to the javafx launch function. We
will use "app" as the id , and this lets us refer to the applet in our JavaScript code as
"document.app" . If we had chosen a different ID, let's say "myApplet" , access
Search WWH ::




Custom Search