Widget Definition Reference¶
A Widget Definition file is a JSON file that contains at least the following parameters:
nameName of the widget.
widthWidth of the widget.
heightHeight of the widget.
startFileEntry point for the widget. This can be a local file or a URL.
transparentBgWhether the widget background is transparent.
Example¶
{
"name": "simple_perf",
"width": 400,
"height": 120,
"startFile": "index.html",
"transparentBg": true,
"required": ["win_simple_perf"]
}
Optional Parameters¶
dataserver: true/false (default false)Defines whether connection and authentication scripts are loaded into the widget. This parameter must be defined and set to
trueif the widget requires a connection to the Data Server. If this parameter is not defined, or iffalseis set, then the connection/authentication scripts are not loaded and the widget will not be able to connect to the Data Server.required: String arrayA string array containing extension identifiers that the widget requires to function. The widget will fail to load if one or more of the extensions listed here are unavailable.
remoteAccess: true/falseBy default, the Chrome instances hosting locally defined widgets cannot access remote URLs (including Javascript libraries and stylesheets hosted on the internet) due to Cross-Origin restrictions. This parameter can be defined by a widget to allow remote URL accesses. If the parameter is defined, a security warning will be shown when loading the widget to remind the user that the widget should be downloaded from a trusted source when allowing remote URL access.
clickable: true/false (default false)Defines whether the widget’s contents can be interacted with by default (e.g. links, App Launcher widgets). See also Widget Menu.