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

Added preload()

This commit is contained in:
Björn Ritzl
2018-06-03 17:32:13 +02:00
parent 724713f9e4
commit ffc148b4bf
2 changed files with 47 additions and 2 deletions

View File

@@ -227,6 +227,14 @@ Go back to a previous Monarch screen
* ```callback``` (function) - Optional function to call when the previous screen is visible.
### monarch.preload(screen_id, [callback])
Preload a Monarch screen. This will load but not enable the screen. This is useful for content heavy screens that you wish to be able to show without having to wait for it load.
**PARAMETERS**
* ```screen_id``` (hash) - Id of the screen to preload.
* ```callback``` (function) - Optional function to call when the new screen is preloaded.
### monarch.data(screen_id)
Get the data associated with a screen (from a call to ```monarch.show()``` or ```monarch.back()```).