3
0
mirror of https://github.com/britzl/monarch.git synced 2025-09-28 02:22:20 +02:00

Added monarch.clear()

This commit is contained in:
Björn Ritzl
2021-07-20 00:27:34 +02:00
parent 9e81b3a327
commit 76d4ca2927
3 changed files with 45 additions and 2 deletions

View File

@@ -33,6 +33,13 @@ Hide a screen that has been shown using the `no_stack` option. If used on a scre
* `success` (boolean) - True if the process of hiding the screen was started successfully.
## monarch.clear([callback])
Clear the stack of screens completely. Any visible screen will be hidden by navigating back out from them. This operation will be added to the queue if Monarch is busy.
**PARAMETERS**
* `callback` (function) - Optional function to call when the stack has been cleared.
## monarch.back([data], [callback])
Go back to a previous Monarch screen. This operation will be added to the queue if Monarch is busy.