On Widget Open
Triggered when the widget UI is opened by the user. This event is useful when actions should occur only when the widget becomes active rather than during page load.
Commonly used for :
- Executing logic when the widget becomes visible
- Refreshing contextual data on activation
- Rendering dynamic UI components
- Tracking widget open events for analytics
- Triggering conditional API calls
Sample Code :
REQUEST DETAILS
window.onload = function () {
ZFAPPS.extension.init().then(function(App) {
App.instance.on('ON_WIDGET_OPEN', function () {
/* Actions */
});
})
};