wilton/kiosk
Open WebView window as a Kiosk.
More...
Functions | |
Undefined | run (Object options, Function|Undefined callback) |
Open and run a WebView window in a current thread. |
This module allows to open and run the WebView window in the current thread.
Caller thread remains blocked until the WebView window is closed.
Uses WebKitGTK backend on Linux and OpenJFX on Windows (requires rhino
or nashorn
engine).
Usage example:
Example of calling JS script in Wilton context (with full access to Wilton API), enableWiltonCalls
option must be set:
Undefined kiosk::run | ( | Object | options, |
Function|Undefined | callback | ||
) |
Opens a WebView window with a specified URL to load.
Current thread remains blocked until WebView window is closed.
Note: on Linux it is better to run kiosk on duktape
JS engine, on Windows rhino
or nashorn
JS engine must be used because on Windows kiosk relies on OpenJFX.
options | Object configuration object, see possible options below |
callback | Function|Undefined callback to receive result or error |
Undefined
Options
String
web address to load in this WebViewBoolean|Undefined
whether to make a window full-screen, default value: true
Number|Undefined
keyboard key to switch WebView window between full-screen and non-full-screen modes, for GTK+ backend see keys mapping: https://gitlab.gnome.org/GNOME/gtk/raw/master/gdk/gdkkeysyms.h , default value on Linux: F11
; non-configurable on Windows, default value: Esc
Number|Undefined
keyboard key to close the WebView window for GTK+ backend see keys mapping: https://gitlab.gnome.org/GNOME/gtk/raw/master/gdk/gdkkeysyms.h , default value: Escape
; not supported on WindowsNumber|Undefined
window width in pixels, default value: 640
Number|Undefined
window height in pixels, default value: 480
Boolean|Undefined
redirect console.log()
messages to STDOUT, default value: false
; not supported on WindowsBoolean|Undefined
enable WebView code inspector, default value: false
; not supported on WindowsBoolean|Undefined
allow to call native code through wiltoncall
API, default value: false
String|Undefined
title of the WebView window, default value: wilton
String|Undefined
path to the PNG
file to use as a WebView window icon, default value: wilton icon; not supported on LinuxString|Undefined
path to the PNG
file to use as a WebView window icon, default value: function(stage) { stage.show(); }