@@ -0,0 +1,1312 @@
+import javafx.application.Application;%0Aimport javafx.scene.Scene;%0Aimport javafx.scene.web.WebEngine;%0Aimport javafx.scene.web.WebView;%0Aimport javafx.stage.Stage;%0A%0Apublic class WebWebViewWithJS extends Application %7B%0A%0A    public static final String HTML = %22%3C!DOCTYPE html%3E%5Cn%22%0A        + %22%3Chtml%3E%5Cn%22%0A        + %22%3Chead%3E%5Cn%22%0A        + %22    %3Cmeta charset=%5C%22UTF-8%5C%22%3E%5Cn%22%0A        + %22%3C/head%3E%5Cn%22%0A        + %22%3Cbody%3E%5Cn%22%0A        + %22%3Cdiv id=%5C%22clock%5C%22%3E%3C/div%3E%5Cn%22%0A        + %22%3Cscript%3E%5Cn%22%0A        + %22function display_clock() %7B%5Cn%22%0A        + %22    var now = new Date();%5Cn%22%0A        + %22    var elem = document.getElementById(%5C%22clock%5C%22);%5Cn%22%0A        + %22    if(elem) %7B%5Cn%22%0A        + %22        elem.innerHTML = now.toLocaleTimeString();%5Cn%22%0A        + %22    %7D%5Cn%22%0A        + %22    setTimeout(display_clock, 1000);%5Cn%22%0A        + %22%7D%5Cn%22%0A        + %22window.onload = function() %7B%5Cn%22%0A        + %22    display_clock();%5Cn%22%0A        + %22%7D%5Cn%22%0A        + %22%3C/script%3E%5Cn%22%0A        + %22%3C/body%3E%5Cn%22%0A        + %22%3C/html%3E%22;%0A%0A    public void start(Stage stage) %7B%0A        final WebView browser = new WebView();%0A        final WebEngine webEngine = browser.getEngine();%0A%0A        webEngine.loadContent(HTML);%0A%0A        Scene scene = new Scene(browser);%0A%0A        stage.setScene(scene);%0A        stage.show();%0A    %7D%0A%0A    public static void main(String %5B%5D args) %7B%0A        launch(args);%0A    %7D%0A%0A%7D%0A

Add a snippet.