CloseRequestedEvent

external class CloseRequestedEvent(source)

The event passed to a {@link Window.onCloseRequested} handler.

Call {@link CloseRequestedEvent.preventDefault} to keep the window open, for example to ask the user to save their work first.

Constructors

Link copied to clipboard
constructor(event: Event<Any?>)

Properties

Link copied to clipboard
external var event: EventName

Event name

Link copied to clipboard
external var id: Double

Event identifier used to unlisten

Functions

Link copied to clipboard
external fun isPreventDefault(): Boolean

Whether {@link CloseRequestedEvent.preventDefault} was called on this event.

Link copied to clipboard
external fun preventDefault()

Prevents the window from being closed.