[android-components](../../../index.md) / [mozilla.components.concept.engine.prompt](../../index.md) / [PromptRequest](../index.md) / [BeforeUnload](index.md) / [&lt;init&gt;](./-init-.md)

# &lt;init&gt;

`BeforeUnload(title: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, onLeave: () -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`, onStay: () -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)`

BeforeUnloadPrompt represents the onbeforeunload prompt.
This prompt is shown when a user is leaving a website and there is formation pending to be saved.
For more information see https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload.

