close() Close the display. display.close() Before closing, calls the function set with onClose(), if any.