Documentation

API Referenceinterface

interface Viewport

Interface definition for an object that contains information about the user’s viewport, i.e. screen or window.

interface Viewport;

Description

A viewport object is available on the global application context, as app.viewport. Properties of this instance can be bound from views, to create a responsive UI, using the bindings from the UI.viewport object.

Examples

// Determine the viewport size directly:
if (app.viewport?.portrait) {
  // ...do something specific here
}

Instance members