To invoke, download the file browser.js and execute it on your command-line like the following example:
$ jjs -fx browser.js -- http://www.twitter.com/brunoborges
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var WebView = javafx.scene.web.WebView; | |
var StackPane = javafx.scene.layout.StackPane; | |
var Scene = javafx.scene.Scene; | |
var url = arguments.join(''); | |
function start(stage) { | |
var browser = new WebView(); | |
var engine = browser.getEngine(); | |
engine.load(url); | |
var root = new StackPane(); | |
root.children.add(browser); | |
stage.scene = new Scene(root, 1080, 800); | |
stage.title = "FX Browser"; | |
stage.show(); | |
} |
And if you liked this, you may want to check out the WebFX project as well. :-)
Nenhum comentário:
Postar um comentário