You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The executable binary file of the browser, ``peb``, ``peb.app``, ``peb.dmg`` or ``peb.exe`` by default, can be renamed with no restrictions or additional adjustments. It can take the name of the PEB-based application it is going to run. If log files are wanted, they will take the name of the binary file without the filename extension, whatever the name may be.
5
+
The executable binary file of the browser, ``peb``, ``peb.app``, ``peb.dmg`` or ``peb.exe`` by default, can be renamed with no restrictions or additional adjustments. It can take the name of the PEB-based application it is going to run. If log files are wanted, they will take the name of the executable file without the filename extension, whatever the name may be.
6
6
7
7
## HTML Page API
8
8
9
-
All local HTML page settings for PEB are stored in a single JavaScript object named ``pebSettings``. This name is mandatory and hard-coded in C++ code. If ``pebSettings`` JavaScript object is not found, no Perl scripts are started automatically, default labels are used for all context menus and JavaScript popup boxes and no warning is displayed for unsaved data in local HTML forms.
9
+
All local HTML page settings are stored in a single JavaScript object named ``pebSettings``. This name is mandatory and hard-coded in C++ code. If ``pebSettings`` JavaScript object is not found, no Perl scripts are started automatically, default labels are used for all context menus and JavaScript popup boxes and no warning is displayed for unsaved data in local HTML forms.
10
10
11
11
```javascript
12
12
var pebSettings = {};
@@ -24,6 +24,8 @@ pebSettings.closeConfirmation =
24
24
'Are you sure you want to close the window?';
25
25
```
26
26
27
+
The ``pebSettings`` JavaScript object may have the following properties:
28
+
27
29
***autoStartScripts**
28
30
``Array`` of Perl scripts that are started immediately after a local page is loaded
29
31
@@ -93,6 +95,8 @@ perl_script.stdoutFunction = function (stdout) {
93
95
}
94
96
```
95
97
98
+
A JavaScript settings object for a Perl script run by PEB may have the following properties:
99
+
96
100
***scriptRelativePath**
97
101
``String`` for the relative path of a Perl script run by PEB
98
102
The script relative path is converted to a full path using the ``{PEB_app_directory}`` as a root folder.
@@ -136,8 +140,6 @@ perl_script.stdoutFunction = function (stdout) {
136
140
``String`` used to signal PEB that [an interactive Perl script](#interactive-perl-scripts) completed its shutdown
137
141
All interactive scripts must exit in 3 seconds after ``scriptExitCommand`` is given or any unresponsive scripts will be killed and PEB will exit.
138
142
139
-
Perl scripts running for a long time should have ``$|=1;`` among their first lines to disable the built-in buffering of the Perl interpreter. Some builds of Perl may not give any output until the script has ended when buffering is enabled.
140
-
141
143
## Interactive Perl Scripts
142
144
Each PEB interactive Perl script must have its own event loop waiting constantly for new data on STDIN for a bidirectional connection with PEB. Many interactive scripts can be started simultaneously in one browser window. One script may be started in many instances, provided that it has a JavaScript settings object with an unique name. Interactive scripts must also have the ``scriptExitCommand`` object property. The ``scriptExitConfirmation`` object property is not mandatory, but highly recommended for a quick shutdown of PEB.
0 commit comments