onLoading
Description
Occurs when loading is triggered. The event will be fired once the client and the server are connected to each other.
Syntax
virtualUI.onLoading = function() {
// Your code here
};
Parameters
| Parameter | Type | Description |
|---|---|---|
handler |
Function | Callback function that executes when the event fires |
Return Value
None.
Remarks
This event is useful for executing initialization code that requires the connection between client and server to be established. Use this event to prepare your application state before the user interface is displayed.
Example
var virtualUI = new Thinfinity.VirtualUI();
virtualUI.onLoading = function() {
console.log('Connection established');
// Initialize application state
// Load initial data
// Prepare UI components
};