modulegui
gui module
Instructions:
1var gui = require('gui');
static function
setVersion
set upWebViewThe highest simulated version of IE within the system. When the system IE version is lower than this version, the system installation version will be simulated.
1static gui.setVersion(Integer ver);
Call parameters:
- ver: Integer, specify the ie simulation version
open
Open a window and visit the specified URL
1
2static WebView gui.open(String url,
Object opt = {});
Call parameters:
- url: String, the specified URL, can be usedfs:pathAccess local file system
- opt: Object, open window parameters
Return results:
- WebView, returns the open window object
The following parameters are supported:
1
2
3
4
5
6
7
8
9
10
11
12{
"left": 100, // specify the left position of the window, default is system auto set
"right": 100, // spcify the top position of the window, default is system auto set
"width": 100, // specify the width of the window, default is system auto set
"height": 100, // specify the height of the window, default is system auto set
"border": true, // specify whether the window has border, default is true
"caption": true, // specify whether the window has caption, default is true
"resizable": true, // specify whether the window is resizable, default is true
"maximize": false, // specify whether the window is maximized, default is false
"fullscreen": false, // specify whether the window is fullscreen, default is false
"debug": true, // specify whether the WebView output error and console info, default is true
}
When width and height are set, but left or right are not set, the window will be automatically centered
Open an empty browser window
1static WebView gui.open(Object opt = {});
Call parameters:
- opt: Object, open window parameters
Return results:
- WebView, returns the open window object
The following parameters are supported:
1
2
3
4
5
6
7
8
9
10
11
12{
"left": 100, // specify the left position of the window, default is system auto set
"right": 100, // spcify the top position of the window, default is system auto set
"width": 100, // specify the width of the window, default is system auto set
"height": 100, // specify the height of the window, default is system auto set
"border": true, // specify whether the window has border, default is true
"caption": true, // specify whether the window has caption, default is true
"resizable": true, // specify whether the window is resizable, default is true
"maximize": false, // specify whether the window is maximized, default is false
"fullscreen": false, // specify whether the window is fullscreen, default is false
"debug": true, // specify whether the WebView output error and console info, default is true
}
When width and height are set, but left or right are not set, the window will be automatically centered
constant
IE7
WebViewie simulation version, specify ie7
1const gui.IE7 = 7000;
IE8
WebViewie simulation version, specify ie8
1const gui.IE8 = 8000;
IE9
WebViewie simulation version, specify ie9
1const gui.IE9 = 9000;
IE10
WebViewie simulation version, specify ie10
1const gui.IE10 = 10000;
IE11
WebViewie simulation version, specify ie11
1const gui.IE11 = 11000;
EDGE
WebViewie simulation version, specify edge
1const gui.EDGE = 11001;