layout |
---|
default |
{% include links %}
- TOC {:toc}
Operate SeLite Settings-managed configurations through API. See its source. In [Core extensions][core extension] access it through object SeLiteSettings
. In other scopes, e.g. Selenium [IDE extensions][ide extension] or code modules (as per {{navJavascriptCodeModules}}), call
Components.utils.import("chrome://selite-settings/content/SeLiteSettings.js");
Define a configuration module (schema) in a Javascript file (in UTF-8). See test_settings_module.js as an example. Instantiate
- subclasses of
SeLiteSettings.Field
, one instance per field - class
SeLiteSettings.Module
, one instance per module
The definition must be
- on the filesystem (possibly a network drive), referenced by its path or file:// URL; or
- in a custom Firefox extension (at {{chromeUrl}} or resource:// URL)
Whenever you update a module definition, you need to either
- refresh it via url chrome://selite-settings/content/tree.xul, and restart any depending extensions (such as Selenium IDE); or
- restart Firefox.
Use SeLiteSettings.loadFromJavascript()
to load or register & load a module programatically. You don't need this if you register the configuration file via SettingsInterface.
See class SeLiteSettings.Module and its methods
getFieldsOfSet()
- primarily for modules that haveassociatesWithFolders==false
getFieldsDownToFolder()
- only for modules that haveassociatesWithFolders==true
See class SeLiteSettings.Field
and its methods setValue(), addValue()
and removeValue()
.