Widget Life Cycle
The widget life cycle includes the following steps
Step 1 - Created
The board layout manager adds a Widget Container, setting it up to independently add the specific widget component into its DOM. Once added, the widget is in the "Created" state.
Once created, a loader will be shown to the user until the initialization process is completed
Step 2 - Ready
When a widget has become active, it should send back a "Ready" state to the widget container. In return, the container will send the widget an init object with data it may need to run.
For example, an iframe component will get a URL to load.
Step 3 - Init
The widget container sends the widget_init_object to the widget and waits for a "Loaded" signal
Step 4 - Loaded
The widget sends a "Loaded" event to the container. The container will remove the loader and show the user the widget.
Updated about 1 month ago