onClose()
Register a function to call right before the display closes.
Called whether the display is closed with the mouse, the keyboard, or close(). Use it to clean up, play a sound, update other displays, and so on.
Parameters
Once an object display has been created, you can use the following function:
display.onClose(action)
| Parameter | Type | Default | Description |
|---|---|---|---|
action |
function |
required | The function to call; it receives no parameters. |