Skip to content

Panel API ​

Provides configuration inspection, runtime attribute updates, and lifecycle events for Default UI (DUI) and Columns UI (CUI) panels.

panel ​

panel.getConfig ​

Report the configuration of the calling panel. A panel configuration exists only for a DUI element or a CUI panel; on a standalone window the call fails.

This method takes no parameters.

Returns

FieldTypeDescription
configPanelConfigThe configuration.
config.panelNamestringDisplay name of the panel.
config.templateNamestringName of the page template the panel loads.
config.edgeStyleintegerEdge style of the panel frame: 0 none, 1 sunken, 2 grey.
config.urlOverridestringURL loaded instead of the template; empty when none.
config.transparentBackgroundbooleanWhether the panel renders with a transparent background.
config.grabFocusbooleanWhether a click gives the panel keyboard focus.
config.enableDragDropbooleanWhether files can be dropped onto the panel.
config.enableDevToolsbooleanWhether the developer tools are enabled.

success is true on success. On failure the response is { success: false, error, code }; see Error codes for code.

js
const result = await fb2k.invoke('panel.getConfig');

panel.setConfig ​

Change the calling panel's configuration. Only the keys below can be set from a page; omitted keys keep their value. The other fields change only through the panel's dialog.

ParameterTypeRequiredDescription
panelNamestringNoDisplay name of the panel.
transparentBackgroundbooleanNoWhether the panel renders with a transparent background.
grabFocusbooleanNoWhether a click gives the panel keyboard focus.
enableDragDropbooleanNoWhether files can be dropped onto the panel.

Returns

FieldTypeDescription
changedbooleanWhether anything changed.

success is true on success. On failure the response is { success: false, error, code }; see Error codes for code.

js
await fb2k.invoke('panel.setConfig', { grabFocus: true });

Security and Permission Constraints

enableDevTools, urlOverride, and templateName govern template loading and debugging security. They can only be modified manually through the panel configuration dialog and cannot be dynamically overridden via API.

Owner-family behavior and limits ​

  • panel.setConfig changes only its documented panel fields.