Temporarily changes the current layer while the given function is running.
Calls the given function and restores the original current layer when the function terminates.
up.layer.current // returns up.Layer.Root
up.layer.open() // open an overlay
up.layer.current // returns up.Layer.Modal
up.layer.parent.asCurrent(function() {
up.layer.current // returns up.layer.Root
})
up.layer.current // returns up.Layer.Modal
The synchronous function to call.
Async functions are not supported.