up.Layer
JavaScript class
Each layer has an up.Layer instance.
Most functions in the up.layer namespace interact with the current layer.
For example, up.layer.dismiss() is a shortcut for up.layer.current.dismiss().
up.layer.current is set to the right layer in compilers and most events,
even if that layer is not the frontmost layer. E.g. if you're compiling a fragment for a background layer, up.layer.current will be
the background layer during compilation.
Features
-
Closes this overlay with an accepting intent, e.g. when a change was confirmed or when a value was selected.
-
Creates an element with the given
selectorand appends it to this layer's content. -
The alignment of this popup overlay.
-
Returns an array of this layer's ancestor layers.
-
Temporarily changes the current layer while the given function is running.
-
Returns this layer's child layer.
-
Returns whether the given
elementis contained by this layer. -
This layer's context.
-
Returns an array of this layer's descendant layers, with the closest descendants listed first.
-
Closes this overlay without an accepting intent, e.g. when a "Cancel" button was clicked.
-
This layer's outmost container element.
-
Emits an event on this layer's element.
-
Whether this layer has visible history.
-
Returns the zero-based position of this layer in the layer stack.
-
Returns whether this layer is part of the layer stack and can be interacted with.
-
Returns whether this layer is no longer part of the layer stack.
-
Returns whether this layer is the current layer.
-
Returns whether this layer is the frontmost layer.
-
Returns whether this layer is still part of the layer stack.
-
Returns whether this layer is not the root layer.
-
Returns whether this layer is the root layer.
-
This layer's location URL.
-
This layer's mode which governs its appearance and behavior.
-
Unbinds an event listener previously bound with
up.Layer#on(). -
Listens to a DOM event that originated on an element contained by this layer.
-
The button or link that opened this overlay.
-
Returns this layer's parent layer.
-
Dismisses all descendant overlays, making this layer the frontmost layer in the layer stack.
-
The position of this popup or drawer overlay.
-
The size of this overlay.
-
Returns an array of this layer and its descendant layers, with the closest descendants listed first.
-
Synchronizes this layer with the rest of the page.
-
This layer's window title.