Edit this page

up.Preview up.Preview.prototype.openLayer()
Instance method

This feature is experimental. Please share your experiences so we know what to keep or change.

Opens a temporary overlay.

When the preview ends, the overlay will be dismissed with a dismissal reason of ":undo-preview".

When the user dismisses the temporary overlay before the server responds, the previewed request will be aborted.

When previewing a render pass that is going to open an overlay, the temporary overlay will use the same visual style and animations.

Example

This preview opens a temporary overlay with a loading message:

up.preview('spinner-overlay', function(preview) {
  preview.openOverlay('Please wait...')
})