Skip to content

Commit 311137e

Browse files
committed
documentation update
1 parent f4848a5 commit 311137e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

doc/SETTINGS.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ Perl Executing Browser - Settings
22
--------------------------------------------------------------------------------
33

44
## Application Filename
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 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.
66

77
## HTML Page API
88

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.
1010

1111
```javascript
1212
var pebSettings = {};
@@ -24,6 +24,8 @@ pebSettings.closeConfirmation =
2424
'Are you sure you want to close the window?';
2525
```
2626

27+
The ``pebSettings`` JavaScript object may have the following properties:
28+
2729
* **autoStartScripts**
2830
``Array`` of Perl scripts that are started immediately after a local page is loaded
2931

@@ -93,6 +95,8 @@ perl_script.stdoutFunction = function (stdout) {
9395
}
9496
```
9597

98+
A JavaScript settings object for a Perl script run by PEB may have the following properties:
99+
96100
* **scriptRelativePath**
97101
``String`` for the relative path of a Perl script run by PEB
98102
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) {
136140
``String`` used to signal PEB that [an interactive Perl script](#interactive-perl-scripts) completed its shutdown
137141
All interactive scripts must exit in 3 seconds after ``scriptExitCommand`` is given or any unresponsive scripts will be killed and PEB will exit.
138142

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-
141143
## Interactive Perl Scripts
142144
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.
143145

0 commit comments

Comments
 (0)