Add Scripts to Your Composites (Optimized Story Experience)
As a story developer, you can add scripts to the composites in your story to customize their interactions.
To add scripts to your composite, hover over it in Outline, and select (Edit Scripts) to the right of it. Select an available event to write the scripts for it in the editor.
Note
Edit Scripts is only available if the composite creator's defined interface events.
You can use the following composite APIs:
Code Syntax
Composite.setVisible(bVisible: boolean): void; Composite.isVisible(): boolean Composite.getLayout(): Layout Composite.setCssClass(className: string): void; Composite.getCssClass(): string; Composite.showBusyIndicator(text?: string): void; Composite.hideBusyIndicator(): void;
In addition, you can use the interface functions defined by the composite creator on the composite. You can find the available functions for the composite in the value help.
Note
The scripts work on the composite as a whole, rather than the individual widgets in the composite.