Skip to content

onClose()

Set up a function to call right before the display closes.

display.onClose(action)

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

display.onClose(action)
Parameter Type Default Description
action function required The function to call; it receives no parameters.