onClose
Description
Occurs when close is triggered. The event will be fired once the application is closed.
Syntax
virtualUI.onClose = function() {
// Your code here
};
Parameters
| Parameter | Type | Description |
|---|---|---|
handler |
Function | Callback function that executes when the event fires |
Return Value
None.
Remarks
This event fires when the application is being closed. Use this event to perform cleanup operations, save application state, or notify the user before the application terminates.
Example
var virtualUI = new Thinfinity.VirtualUI();
virtualUI.onClose = function() {
console.log('Application is closing');
// Save user data
// Clean up resources
// Show goodbye message
};