API reference up.layer
module

Features to open, close and look up overlays.

Add [up-layer=new] to a link or form to show its response in a new overlay, or open one from JavaScript with up.layer.open(). An overlay closes when the user dismisses it, or when an [up-accept] link or form closes it with a result value. up.layer.ask() opens an overlay and returns a promise for that value, so a subinteraction reads like a function call.

up.layer.current is the layer your code is working with, and most functions in this module operate on it: up.layer.on() listens to events from the current layer only, and up.layer.dismiss() closes it. The layers themselves are up.Layer objects, listed in up.layer.stack.


Features