TrayBrowser - Settings - Types

Last modified by Alex/AT on 2025/12/28 09:50

As TrayBrowser is for people familiar with web and web programming, there is no need to explain types in detail. Still, configuration parameters types have some specifics that are listed here.

Boolean

In configuration files, 'true' and 'false' values for boolean parameters may be set with any of the following literals, allowing for friendly settings values if necessary:

  • True: true, 1, yes, on, enable, enabled, active, +
  • False: false, 0, no, none, off, disable, disabled, inactive, passive, -

Boolean type literals are case-insensitive.

Examples (functionally equivalent):

Movable=1
Sizeable=0
MaximizeButton=1
Movable=true
Sizeable=no
MaximizeButton=enabled

In runtime settings change API calls, boolean setting values can also be represented by normal JS booleans (true or false) or integers of 0 and 1.

String

Just an arbitrary UTF-8 encoded string, usually limited by the number of characters (meaning bytes, not UTF-8 code points) possible. Strings longer than limit will be silently trimmed, and possibly not on UTF-8 code point exactly, beware. Some parameters also limit character set possible, with any character out of such silently discarded.

Empty strings can be set just by omitting any value after Parameter= definition (note the =), = sign must not be omitted (the parameter will not be interpreted otherwise). For some parameters, providing empty string will mean returning to the default parameter value, this is mentioned for corresponding parameters with such behavior.

Example:

Title=My Title
URL=https://domain.com

In runtime settings change API calls, integers may also be treated as strings.

Integer

Any unparseable integer value will mean returning parameter value to the default. Floating-point numbers are rounded (meaning 0.4 will mean 0 and 1.5 will mean 2). Negative values, where possible, are subject to mathematical negative rounding (so -0.4 will mean 0 and -0.5 will mean -1). It is advised to avoid floating point values in integer type parameters.

Integer parameters are usually limited by minimum / maximum value possible. Any value out of bounds will mean parameter value returning to default.

Example:

Width=1024
Height=768

In runtime settings change API calls, strings containing integers (i.e. "0" or "1234") will also be converted to integers.

Choice

Choice type provides a number of options to select from. Usually these are small arbitrary strings, case-insensitive. In some cases (where mentioned explicitly) specific boolean value literals may also be accepted as one of the choices aliases.

Example:

Fullscreen=kiosk
RememberPosition=no

Any invalid value or empty choice value will result in default choice value being used and choice parameter treated as 'not set' in cases defaults are defined by other settings.

Take care that in runtime settings change API calls, native JS boolean values will not be converted to boolean equivalent strings and thus choice settings are not compatible with native JS boolean type.

Special

Any parameter type not described here will be explicitly described in the parameter documentation.